I am using the request
module in NodeJS to make an API call.
The request options are like this:
reqOpts: {
form: {
client_id: 'someID'
client_secret: 'someValue'
grant_type: 'someValue'
refresh_token: 'dumm//yrefresh'
},
method: 'POST',
url: 'someUri.com'
}
For the above request options, the response has a field, response.request.body
which looks like this:
'refresh_token=dumm%2F%2Fyrefresh&grant_type=someValue&client_id=someID&client_secret=someValue'
Here you can see that refresh_token
field was URL encoded in response i.e //
got changes to %2F%2F
. Is there a way to pass some parameters so that the response.request.body
doesn’t encode the string and returns //
intact as in the request?