【发布时间】:2014-01-24 12:27:50
【问题描述】:
我想使用 clj-http 创建一个多部分 HTTP 请求。多部分请求如下:
--Boundary
Content-Type: text/xml; charset=UTF-8
Content-Id id1
xml1
--Boundary
Content-Type: text/xml; charset=UTF-8
Content-Id id2
xml2
--Boundary--
我正在使用这个 Clojure 代码来构建多部分请求:
(post "url"
{:multipart [{:name "XML1"
:content Xml1
:encoding "UTF-8"
:mime-type "text/xml"}
{:name "XML2"
:content Xml2
:encoding "UTF-8"
:mime-type "text/xml"}]})
如何在多部分中添加Content-Id?
【问题讨论】:
标签: clojure clojure-contrib clojure-java-interop