Payload logging not supported for unknown content-type.**

PK2427
Tera Contributor

Hello Experts,

 

We have a requirement to upload an attachment using REST API. Below is the curl command:
curl -X POST http://example.com/RESTws/uploadDocument?docTitle=Demo&eventId=3329-DIFFROU-20230712-088276&source=m... -H "accept: */*" -H "Content-Type: multipart/form-data" -F file=@myfile.xlsx;type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.

How can i write the BR script for same.

 

Is it possible to pass an absolute file path to rest API or do we need to read the file and pass it as an encoded string?

 

 i tried by adding the header as multipart/form-data along with file MIME type.

in this case am getting 500 status with below response

                // {"timestamp":"05-01-2024 07:53:16","errorMessage":"Current request is not a multipart request"}

               

after that i tried with not setting header then am getting 400 error with below response

                // **Payload logging not supported for unknown content-type.**

 

Please provide the example script.

 

0 REPLIES 0