r0man / cljs-http

A ClojureScript HTTP library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get request not sending body

shmish111 opened this issue · comments

When I use the following request in google chrome, it shows me the payload that was sent correctly

(http/post (str host "/profiles/search") {:with-credentials? false
                                           :accept            "application/edn"
                                           :edn-params        {:query query}})

However if I use a GET request it appears from chrome developer tools that no payload is sent:

(http/get (str host "/profiles/search") {:with-credentials? false
                                           :accept            "application/edn"
                                           :edn-params        {:query query}})

Looking in the source code I cannot work out why this is?

Same problem

cljs-http doing everything properly,

but, accordingly to https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send body in GET/HEAD request are not supported. which is weird.