User-Agent HTTP Header

2 views
Skip to first unread message

Alex C

unread,
Jul 1, 2008, 10:30:43 AM7/1/08
to Digg API
Hey guys,

I'm trying to create my first tool using the Digg API, and I noticed
this in the wiki:

"All requests must include a User-Agent HTTP Header"

I saw two examples of how to set one, in PHP and Ruby, but I cannot
figure out how to include a User-Agent HTTP Header in JavaScript. (I
searched around a lot).

If someone could show me a conventional way to define a User-Agent
HTTP Header in JavaScript, that would be great.

Any help would be much appreciated ;)

Michal Migurski

unread,
Jul 1, 2008, 12:57:20 PM7/1/08
to Digg API
Your browser will handle this for you, transparently, if that's how
you're using Javascript. E.g., the user agent would be "MSIE" or
"Mozilla", depending on what browser you're using.

-mike.

Alex C

unread,
Jul 1, 2008, 3:53:42 PM7/1/08
to Digg API
Great! Thanks :)
Reply all
Reply to author
Forward
0 new messages