var http = require('http');
var options =
{
host: 'www.someserver.com',
headers: {'user-agent': 'Mozilla/5.0'},
path: '/test.cgi'
};
http.get(options, function(res) {
...
passes the simple user agent, Mozilla/5.0. You can choose any from
UserAgentString.com - List of User Agent Strings
Jake
On Jun 3, 2014, at 5:37 PM, Marc Juretus <[email protected]> wrote:
> Do you have a link to an example on how to set the User Agent Header?
>
> On Tuesday, June 3, 2014 12:49:24 PM UTC-4, Warren Lindsey wrote:
> Set your own user agent header. If you're using the "request" module it's
> very easy. Some sites also check referrer to ensure you're not deep linking.
>
> On Jun 3, 2014, at 8:10, Marc Juretus <[email protected]> wrote:
>
>>
>>
>> First off I love the module works great for most part. Had one question. One
>> of the sites i'm trying to read some data in from gives me this error.
>>
>> "Anonymous Browser error #80040156"
>>
>> Have you seen this before and is there a workaround for it?
>>
>> Thanks in advance
>>
>>
>> MaRc
>>
>> --
>> Job board: http://jobs.nodejs.org/
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/541c30f6-9840-4971-bb23-9252e66f7633%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/86244a12-7420-462b-9d78-085658e50b2b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/0856C884-45FE-4AF6-B9A9-06C8A99A8F0C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.