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

compatibility issue with request-promise: request.defaults is not supported. #8

Open
markstos opened this issue Sep 17, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@markstos
Copy link

This works with request.promise:

var rp = require('request-promise')
var r1 = rp.defaults({json:true})
var r2 = r2.defaults({ baseUrl: "http://localhost" })

But not with request-promise-retry:

var rp = require('request-promise-retry');
var rp1 = rp.defaults({json:true});
var rp2 =  rp1.defaults({ baseUrl: "http://localhost" })

The case of "double defaults" comes up with a module defines it's own defaults, but also allows you to pass in your own request object which may also have defaults. The node-strava-v3 module works like this.

It would be a welcome addition if request-promise matched the request-promise behavior here.

Thanks.

@void666 void666 added enhancement New feature or request help wanted Extra attention is needed labels Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants