Fix bugs around special characters in API payload; improvement on error reporting when making request

I've merged in and expanded upon the encode_uri branch for handling special characters in the payload which cause the API request to fail with invalid signature. These are: ()!'*

I've also added in checking for an error on the request as well as an empty response body, and treating those the same as other errors.