cancel
Showing results for 
Search instead for 
Did you mean: 

POST form data http connector

0 Kudos

Hello everybody,

I would like to POST form data with CPI, first I tried with Postman and It was ok you cans see below the raw data :

Then I try with CPI but I am not abble to replicate the case on CPI :

You will find attach the xml that I Try to send test-form-data.xml in CPI I put the headers like this :

Content-type multipart/form-data; boundary=cpi

then the body structure is like this :


I got an error 400 I don't know if I missed something, I already try the solutions on the link below :

https://blogs.sap.com/2019/11/14/what-is-form-data-and-how-to-send-it-from-sap-cloud-platform-integr...

but without succes.

Do you have any ideas ?

Thanks for you answers

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Ok I put it like this

manoj_khavatkopp
Active Contributor
0 Kudos

How about content-Type header in HTTP header section i.e on content -modifer set Content-Type header and push the same data to reciever system ?

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Pascal ,

Building MIME content using content modifier corrupts data , you can trying building MIME using the script from below link :

https://answers.sap.com/questions/12716088/sap-cpi---forwarding-raw-image-data-through-integr.html

Thanks,

Manoj

0 Kudos

Hello manoj.khavatkopp,

Thank you very much for your answer, but I can't see any script into the link you gave me ?

Am I wrong ?

Regards

0 Kudos

I found it sorry, I looked to quickly the blog post.

I will try to apply it.

Thanks

0 Kudos

Hello Manoj K,

Do I have to set my body in a content-modifier with data like this concerning the body ? Do I have to set a content-modifier before with header with content-type ?

Below you can find my body

Thanks for your help.

Regards

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Pascal,

You can set the content-type header and body in the same content-modifier, as the execution order of content- modifier is the first header then property then the respective body section.

Thanks,

Manoj

PriyankaChak
Active Contributor
0 Kudos

Using MIME Multipart Encoder may help.

Link: reference link

Hello priyanka2018,

Thank you very much for your answer.

Regards