Skip to content

A couple of issues I noticed #4

Description

@bellostom

Hi

Just wanted to mention some issues I noticed

  1. You should add the Content-Type: application/json to the headers you send

  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions