Open vincentjames501 opened 2 years ago
Agreed about the multimethod for ->request-body
I don't like to assume a content-type of text/plain just because someone handed me a string. The truth is I don't know what's in it, and the best I can honestly tell the server is "here are some bytes". The caller needs to set a content-type header if they want to tell the server something more specific.
@RutledgePaulV , I fixed this in #9
It's pretty much always set to
application/octet-stream
which makes a lot of sense for byte-arrays, files, inputstreams, etc. But for Strings, we should consider following what is done in clj-http?https://github.com/dakrone/clj-http/blob/3.x/src/clj_http/multipart.clj#L101
Rewriting
->request-body
to be adefmulti
would be nice too as it would allow people to extend the library more easily to support custom types.