- Return
_headers
in stream creation errors as well
- Fix encoding of special characters in direct messages (#38)
.post()
now only takes two parameters: the resource and the body/parameters. If you were previously passingnull
for the body, just delete that, and the next parameter will become the body.
- Properly encode and sign POST parameters/body depending on whether the endpoint takes
application/json
orapplication/x-www-form-urlencoded
- Support empty responses (e.g. those returned by
direct_messages/indicate_typing
) (fix #35)
- Encode special characters in the POST body (fix #36)
- Given that developers expect promises to reject when they don't return the requested data,
.get
and.post
now reject instead of silently returning API errors as an array under theerrors
key of the response object.