node-heroku icon indicating copy to clipboard operation
node-heroku copied to clipboard

Heroku POST json issue

Open discretepackets opened this issue 13 years ago • 5 comments

Hi Romain,

I think there is currently a problem with POSTing to Heroku's API via JSON data.

Here's the link to a test repo I made: https://github.com/discretepackets/heroku_api_test

Thanks!

discretepackets avatar May 14 '13 16:05 discretepackets

Thanks. Interestingly I was just working on it. Looks like JSON Content-Type isn't supported anymore..

toots avatar May 14 '13 16:05 toots

Should be fixed with 0.1.0.

toots avatar May 14 '13 16:05 toots

Yeah when I saw your commit about reading and returning response data on error I thought you might be investigating the same issue : )

discretepackets avatar May 14 '13 17:05 discretepackets

Sorry about the trouble here guys! This was an accidental side-effect rather than a deliberate deprecation (which we would have announced). The API was never specifically designed to take JSON, but Rails was providing decoding for us for a long time as part of its magical internals. That said, JSON request bodies will return.

brandur avatar May 14 '13 20:05 brandur

Hi @brandur. No problem. JSON payload for API requests was never actually documented so that's your guys right to change anything. I reverted to urlencoded data after following the examples in the API doc website, which makes this format the documented one to me, at least implicitly..

toots avatar May 14 '13 22:05 toots