planck

Planck ClojureScript REPL
niamu 2016-11-15T05:52:12.000444Z

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.

slipset 2016-11-15T06:23:46.000445Z

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?

niamu 2016-11-15T06:26:29.000446Z

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.

niamu 2016-11-15T06:27:03.000447Z

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

niamu 2016-11-15T06:27:35.000448Z

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

anmonteiro 2016-11-15T08:55:36.000449Z

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

niamu 2016-11-15T14:43:37.000450Z

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