我在node.js中看到很多模块,例如busboy,multer,厉害,但它们无法解析multipart/mixed
主体。
node.js中的请求multipart/mixed
的示例
--batchbatch
Content-Type: multipart/mixed; boundary=changeset1
--changeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST data HTTP/1.1
Content-Type: application/json
Content-ID: ID1
Content-Length: 10000
{
"Name": "ddd",
"data1": "3",
"data2": "40",
"data3": "OPPT",
"data3":"D1000",
"dat4": "D1000"
}
--changeset1--
--batchbatch
Content-Type: multipart/mixed; boundary=changeset2
--changeset2
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH data/32451 HTTP/1.1
Content-Type: application/json
Content-ID: ID1
Content-Length: 10000
{
"code": "3"
}
--changeset2--
--batchbatch
Content-Type: multipart/mixed; boundary=changeset3
--changeset3
Content-Type: application/http
Content-Transfer-Encoding: binary
DELETE /data/2345 HTTP/1.1
--changeset3--
--batchbatch--