Fork me on GitHub
#planck
<
2016-11-15
>
niamu05:11:12

I’m having trouble posting JSON data with Planck. Is this supported? It looks like it might be based on the source code, but I can’t seem to get it to work. I believe Planck may be sending a url encoded body rather than the JSON body that I want it to send.

slipset06:11:46

It's some time since I wrote that code, and it's not in front of me right now, but could you tweak some headers?

niamu06:11:29

I tried, but couldn’t get anything to work. I believe the problem is in wrap-form-params because it forces the body to get URL encoded before it is sent regardless of content-type.

niamu06:11:03

I’m going to attempt to make use of goog.net.XhrIo instead and see how that goes.

niamu06:11:35

I’ll update here tomorrow with my findings. Maybe sleep will help too.

anmonteiro08:11:36

FWIW I don't think XhrIo will work because there's no XMLHttpRequest object

niamu14:11:37

Alright. I worked it out. It was totally my fault as I was passing data with :form-params instead of :body.