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

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
User avatar
MARCOREMMEDATA
Posts: 14
Joined: Mon Apr 11, 2022 4:48 pm
Location: ITALIA
Contact:

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

Post 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?
MARCO ROSSI | Software Developer Sr. - Software Production
Post Reply