You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When headers set "content-type" with "application/x-www-form-urlencoded", it is setting correct content type with request method POST. But with other type, content type is not set and request method is OPTIONS.
(http/post "http://example.com" {:edn-params {:foo :bar}})
When headers set "content-type" with "application/x-www-form-urlencoded", it is setting correct content type with request method POST. But with other type, content type is not set and request method is OPTIONS.
(go
(let [r {:with-credentials? false,
:scheme :http,
:server-name "localhost",
:server-port 3000,
:uri "/post",
:headers {"content-type" "application/x-www-form-urlencoded"},
:request-method :post
:query-params nil,
:query-string nil,
:body "a=1",
}](->
%28xhr r%29
%28<!%29
%28log%29)))
Here
General
Remote Address:127.0.0.1:3000
Request URL:http://localhost:3000/post
Request Method:POST
Status Code:200 OK
Request Headers
Accept:/
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:3
Content-Type:application/x-www-form-urlencoded
Host:localhost:3000
Origin:http://localhost:3449
Referer:http://localhost:3449/
(go
(let [r {:with-credentials? false,
:scheme :http,
:server-name "localhost",
:server-port 3000,
:uri "/post",
:headers {"content-type" "application/edn"},
:request-method :post
:query-string nil,
:query-params nil,
:body (pr-str {:a 1}),
}](->
%28xhr r%29
%28<!%29
%28log%29)))
General
Remote Address:127.0.0.1:3000
Request URL:http://localhost:3000/post
Request Method:OPTIONS
Status Code:200 OK
Request headers
Accept:/
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:content-type
Access-Control-Request-Method:POST
Connection:keep-alive
Host:localhost:3000
Origin:http://localhost:3449
Referer:http://localhost:3449/
This is not an issue for cljs-http but goog.net.xhr.
The text was updated successfully, but these errors were encountered: