cancel
Showing results for 
Search instead for 
Did you mean: 

How to Post data in API in form-data by using SCPI

11-11-2021 3:53 PM
SAP Managed Tags
Subscribe

Hi All,

I have a requirement where i need to pick the file from SFTP server(.csv format) and post the file in web service by using http adapter. we are posting the data in web service by using form-data but iam not able to post it in web service, I'm getting below error can you please help me out here below is the error and details which i have used in content modifier in my iflow.

in content modifier i have used like this

Content-Type: multipart/form-data; boundary= --${header.File Name}.

and in the body of the message is like this


Accepted Solutions (1)

Accepted Solutions (1)

maik_bosch
Contributor
0 Likes

Thank you

Answers (3)

Answers (3)

MajoMartinez
Product and Topic Expert
Product and Topic Expert
0 Likes
sam_anish1
Participant
0 Likes

Hi Anil,

I don't see the actual error you are facing in the question you have posted so I'll just give you some points to look into.

1. Its not a good idea to define the expression "File Name" in the Message header of a content modifier & call it in the Message body of the same content modifier. You can try having two Content modifiers. One to define your Message header & the next one to define your Message body.

2. Avoid spaces when defining a property in the Message header. You can try "FileName" in the Name field instead of "File Name".

3. Double check the Content-type in the Message Body of the content Modifier. Since you mentioned it to be a CSV file, 'text/csv' & 'application/csv' are two options you may want to check out.

Hope this helps.

Regards

Sam

0 Likes

Thank you

Sriprasadsbhat
Active Contributor
0 Likes
0 Likes

Thank you