Open timmeade opened 7 years ago
I've had this issue when failing to pass appropriate headers to the API in question. Setting my HTTP headers to Accept application/json
and a suitable User-Agent string produced the parsed JSON response I was looking for.
Example code would be useful in diagnosing your issue.
data is: <Buffer 3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 3c 74 69 74 6c 65 3e 34 31 34 20 52 65 71 75 65 73 74 2d 55 52 49 20 54 6f 6f 20 4c 61 72 67 65 3c 2f 74 69 ... >
after post:
data.toString('utf8') gives:
Which is an entire other issue...