What you are describing is not url-encoding but xml-entity-quoting. The problem is not with the http-kit client but somewhere else in your stack.
On my system (http-kit 2.1.16) I get the expected result: In a terminal: $ nc -l localhost -p 9999 In a repl: @(org.httpkit.client/post "http://localhost:9999" {:body "<foo>bar</foo>"}) Back in the terminal, I see: GET / HTTP/1.1 Host: localhost:9999 Accept: */* User-Agent: http-kit/2.0 Accept-Encoding: gzip, deflate Content-Length: 14 <foo>bar</foo> On Friday, November 14, 2014 6:47:23 AM UTC-6, Saju Ravindran Pillai wrote: > > Hi, > > I need to POST an XML body to an http endpoint, which replies back with a > xml response. > > I do this .. > (org.httpkit.client/post uri {:body (str “<foo>bar</foo>”)}) > > but the client is encoding the xml tags to > & < > > I then tried : > > (org.httpkit.client/post uri {:body (str “<foo>bar</foo>”) > :content-type > "application/octet-stream" > :content-encoding > "application/octet-stream” > :mime-type > “application/octet-stream” > :body-encoding > “application/octet-stream”}) > > .. hoping that one of those options will do the trick — but no luck. > > How do I prevent http-kit from url-encoding the post body? > > -srp > ps: > > The following works … > > curl -X POST -d @file http://uri/ > $ cat file > <foo>bar<foo> > > ________________________________ > > This e-mail message is authorized for use by the intended recipient only > and may contain information that is privileged and confidential. If you > received this message in error, please call us immediately at (425) > 590-5000 and ask to speak to the message sender. Please do not copy, > disseminate, or retain this message unless you are the intended recipient. > In addition, to ensure the security of your data, please do not send any > unencrypted credit card or personally identifiable information to this > email address. Thank you. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.