Closed vincentjames501 closed 2 years ago
clj-okhttp considers the "Content-Type" header of the request when encoding the body. I think it's a mistake to support the option in two different places (though I realize it would provide better compatibility with clj-http). Similarly, if you want to set an accept header, why not just set a "Accept" header.
@RutledgePaulV , I think that's fair and I agree (though it's a bit more painful to type):
(http/post "feh" {:content-type :json :accept :json :body {}})
vs
(http/post "feh" {:headers {"content-type" "application/json; charset=utf-8;"
"accept" "application/json; charset=utf-8;"
:body {}})
I'll close this.
This could help with automatic coercion of
:body
params for example similar to whatclj-http
does when submitting something like:content-type :json