Https request for upload a file using POST method with the body of request is multipart/form data

Is it possible to call API as run https request for upload a file using POST method with the body of request is multipart/form data. Please give me an example. Thanks in advance!

@ADimmitrova
welcome to the forum

it depends on the API and which payload is how expected. Can you share some more details with us?

Tanks for the answer. I have to upload a pdf file to url address with Content Type:
multipart/form data and using SSL certificate. I try to pass Contenet-Type as headers and a file as attachments but is don’t work, response status: 500 / {“failureOrigin”:“INTEGRATION”,“cause”:{“message”:“Error”}}

we would suggest the following:

  • test the call with Postman
  • then transfer / build it within UiPath HTTP Request

feel free to share the curl with us (redact sensitive data)

Especially with multipart / attachments when the API expects it under a certain constraint / key we encountered some limitations by the implementation of the HTTP Request. In such case we can handle it by custom code and using the HttpClient class

maybe this converter helps for the start

Thanks Peter! It works ok with Postman. I will try to use a code with HttpClient Class.