Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to send multipart/form-data to external API using REST Adapter in Oracle SOA 12c

User334814Mar 7 2022

Hello,
We have a requirement where we need to send data to external REST API in form-data where we need to pass the required data in form. Name of the text box is data and we need to send data to external API by providing the value in form text box.
Below is the curl command for this:

curl -X POST "http://hostname:port/api/template/8" -H  "accept: */*" -H  "Authorization: Bearer ********" -H  "Content-Type: multipart/form-data" -F "data=[   {     "Entity": null,     "EntityCode": null,     "MainDocumentNumber": "120",     "ReceivingDate": "09/25/2021",     "Year": "2",     "Supplier": "12312sd",     "PurchaseOrderId": null,     "PurchaseOrderDate": null,     "ShipId": null,     "ShipDate": null,     "ReviewId": null,     "ReviewDate": null,     "ReceiveNoticeId": null,     "ReceiveNoticeDate": null,     "ItemId": 120,     "ItemName": "FULL VERTEX DESKTOP CHARGER VAC-10",     "UnitId": 2,     "Quantity": 128,     "UnitPrice": 2.0,     "TotalAmount": 128,     "Note": "Supplies",     "WarehouseId": 0,     "Recordkey": 2074973   }]"
Comments
Post Details
Added on Mar 7 2022
0 comments
1,138 views