feross / simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
MIT License
401 stars 50 forks source link

JSON.parse error for 204 status code (no content) #63

Open alessioalex opened 3 years ago

alessioalex commented 3 years ago

So I'm sending a JSON object via the POST method and using .concat, but the problem is the endpoint is returning 204 No Content and simple-get is trying to parse that. I think the correct behavior in this case would be to return an empty object or even null.