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 }]"