Request Generator supposed to return request object
zzxoto opened this issue ยท 5 comments
zzxoto commented
The request generator provided in the options is supposed to return request object (as seen in the line 190 - 193 in the httpClient.js). However this fact is missing (or outdated) in the markdown documentation. The documentation instead has the following:
module.exports = function(params, options, client, callback) {
generateMessageAsync(function(message) {
if (message)
{
options.headers['Content-Length'] = message.length;
options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
}
request = client(options, callback);
if (message){
request.write(message);
}
return request;
}
}
Package version: "5.0.4"
alexfernandez commented
Well seen! Care to send a pull request? ๐
zzxoto commented
On it.
Btw, would you like the documentation to be changed, or the api.
alexfernandez commented
What do you think is more useful? I would think that changing the documentation would be best.
zzxoto commented
I will get back at this with a well thought out answer, might take as long as a week though.
alexfernandez commented
A bit late ๐ but the docs have been fixed here: 8220349