-
Hi, I'd like to request a fixed-length multipart request. The code below requested with const undici = require("undici");
(async () => {
const formData = new undici.FormData();
formData.append("myname", "myvalue");
const res = await undici.request("http://localhost:8181", {
body: formData,
});
})(); $ nc -lp 8181
PUT / HTTP/1.1
host: localhost:8181
connection: keep-alive
content-type: multipart/form-data; boundary=----formdata-undici-0.5140957512643098
transfer-encoding: chunked
64
------formdata-undici-0.5140957512643098
Content-Disposition: form-data; name="myname"
myvalue
2a
------formdata-undici-0.5140957512643098--
0 |
Beta Was this translation helpful? Give feedback.
Answered by
ronag
May 6, 2022
Replies: 1 comment
Answer selected by
nwtgck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1421