Answer the question
In order to leave comments, you need to log in
How to correctly form multipart form-data to send a POST request to node-fetch?
Good afternoon guys, please tell me how to correctly form the request body?
Here is a part of my code, here is a method, the headers are passed by the object and body in which you need to put multipart form data
fetch(server, { method: 'POST', headers: myHeaders, body: body, credentials:'same-origin'})
0
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="Filename"
1528584248.huf680792e391ddf39.mail.pchome.com.tw,S=0
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="Rmfile"
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="Savefolder"
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="new_attachment"
a%3A0%3A%7B%7D
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="Timestamp"
1528584248
------WebKitFormBoundaryh7d8anwOMRWaKLOb
Content-Disposition: form-data; name="backup"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question