We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi
Just wanted to mention some issues I noticed
You should add the Content-Type: application/json to the headers you send
When you decode the server's response and you check for the result key in the object, you then call
callback(null, decoded.result);
but if you find the error key you invoke the callback as
callback(decoded.error);
Why would you send the null?
Why not just use
callback(response)
Other than these, great work
The text was updated successfully, but these errors were encountered:
Regarding the second 2. point: I think the current way is ok. Because the callback can then look like this:
function(err, result) { ... }
which is exactly the same ways as the current node.js API looks like.
Sorry, something went wrong.
No problem.
But I think you should change the code in the examples, to reflect the current API
Thomas
No branches or pull requests
Hi
Just wanted to mention some issues I noticed
You should add the Content-Type: application/json to the headers you send
When you decode the server's response and you check for the result key in the object, you then call
callback(null, decoded.result);
but if you find the error key you invoke the callback as
callback(decoded.error);
Why would you send the null?
Why not just use
callback(response)
Other than these, great work
The text was updated successfully, but these errors were encountered: