node-request-caching
node-request-caching copied to clipboard
POST for objects
I am trying to do a POST where request body has to be:
{keys: [1,2,3,4]}
When I set params to this, what gets posted is:
keys=1&keys=2&keys=3&keys=4
(my object turned into query string).
Any easy way to change this?
I think the fix can be on line 57 of the request-caching.js:
//options.paramsStringified = querystring.stringify(options.params);
options.paramsStringified = JSON.stringify(options.params);