Page 1 of 1

Add file in a multipart/form-data; boundary=

Posted: Mon Jan 27, 2025 8:20 pm
by MARCOREMMEDATA
Hi

i've to send a POST request with a Content-Type: multipart/form-data

In postman i've these specification: multipart/form-data; boundary=<calculated when request is sent>

If i try to use these code

Code: Select all

£ContentInfo.MediaType := "multipart/form-data" 

£HttpRequest.Content.AddFile PATH(£p_FilePath) CONTENTINFO(£ContentInfo)
i've in respose http status 405

Maybe beacause the boundary is missed. In wich way i can format the request to send a pdf?
Does anyone have the same problem?
Do you have any suggestions on how to solve it?