Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns Not Found in body #2002

Closed
webchaz opened this issue Jan 11, 2016 · 3 comments
Closed

Returns Not Found in body #2002

webchaz opened this issue Jan 11, 2016 · 3 comments

Comments

@webchaz
Copy link

webchaz commented Jan 11, 2016

I'm using request to get a url, very simple like this:

request({
  url: 'http://domain.com',
  method: "GET",
  jar: j
}, function(error, response, body) { 
  console.log(response);
  console.log(error);
  console.log(body);
});

I can access the url in the browser no problem, however the body using request returns 'Not Found' It's an internal URL, otherwise I would post here.

Any ideas why this isn't able to get the full contents? Curl does the same thing (Not Found). The page it's getting is run via nginx with node upstreams.

@SimonSchick
Copy link

Have you tried changing the user agent?

@ghost
Copy link

ghost commented Feb 10, 2016

if (error !== undefined
 || (_.isNumber(response.statusCode) &&  response.statusCode >= 400))
{
     ...
}

@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2018
@stale stale bot closed this as completed Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants