Skip to content

Added section about passing options to request#24

Open
stylesuxx wants to merge 1 commit into
chill117:masterfrom
stylesuxx:master
Open

Added section about passing options to request#24
stylesuxx wants to merge 1 commit into
chill117:masterfrom
stylesuxx:master

Conversation

@stylesuxx
Copy link
Copy Markdown

When you want to pass options to the request call, it is not enough to set them in the options argument, they need to be within the key requestOptions.

Also I think, that the user passed options should be the last ones applied and override anything that is set by the library. Right now the library is overwriting some of the options.

I would suggest setting the user options for requests before the actual call to request:

var req = request(requestOptions);

I am aware this can break the call - but if the user is passing options to request, I guess he knows what he is doing.

If you like the idea I can submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant