Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Forms, Auth and such documentation incomplete #629

Closed
Suor opened this Issue · 3 comments

3 participants

@Suor

When I do request.post(...) or like without passing callback, then do some stuff with it form or .auth(), I am left with something I don't know what to do with.

Ok, If I read streaming section I could guess it's a stream, but it is not stated clearly even there. And it is still unclear where should I pass a callback to get response and body as usual. Or I am left with stream API only? Should I parse headers myself then? Many questions.

@codecowboy

@Suor did you figure this out?

@Suor

No, but I didn't try to hard, though

@nylen
Owner

You should be able to do something like this:

request.post(...)
    .auth(...)
    .callback = function(err, res, body) {
        // ...
    });

I usually use this style instead though:

request({
    uri : ...,
    method : 'POST',
    auth : { ... }
}, function(err, res, body) {
    // ...
});
@nylen nylen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.