Send documents
Last updated
Last updated
You might want to attach documents to transport orders, invoices or add a security protocol document to a site.
In order to send documents within a request, you need to specify the header "Content-Type: multipart/form-data"
in your request.
When header "Content-Type: multipart/form-data"
, there is also a boundary
attribute that is given in the Content-Type
. See this exemple :
The value for boundary
changes according the content of the request. The boundary
attribute and its value is usually added by the code library you use to send requests.
In the screenshot below, we can see that when using Postman to prepare a request with "form-data" kind of body, Postman automatically prepares the "Content-Type" header and the boundary
will be generated when the request is sent.
If you are receiving this kind of error:
you should search documentation of your coding language, library, or framework to find how this "boundary" attribute can be added to your request.