有没有办法在 nodeJS 中发送发布请求并指定内容长度。
我试过(使用 axios):
let data = `Some text data...........`;
let form = await Axios.post(
"url.......",
data,
{
headers: {
Authentication: "token.....",
"Content-Type": "multipart/form-data; boundary=c9236fb18bed42c49590f58f8cc327e3",
//set content-length manually
"Content-Length": "268"
}
}
).catch(e => e);
它不起作用,长度会自动设置为我通过的值以外的值。
我正在使用 axios,但可以使用任何其他方式从 nodeJS 发布。