I'm trying to make an http request to an with a multipart/form-data payload and this is what my payload looks like:
------WebKitFormBoundary
Content-Disposition: form-data; name="data"
Content-Type: application/vnd.ms-excel
EmployeeEmail,ManagerEmail,Admin
inviteThis@email.com,managers@email.com,false
------WebKitFormBoundary
Content-Disposition: form-data; name="requestJobDescription"
Content-Type: application/json
{
"type": "update",
"credentials": {
"partnerUserID": "somePartnerUserId",
"partnerUserSecret": "partner123user456secret789"
},
"inputSettings": {
"type": "employees",
"policyID":"some123policy456ID",
"fileType": "csv"
}
}
------WebKitFormBoundary--
I have tested the same exact payload to call directly call the API using postman and I get the ok status. However when I used this code:
Im not getting the ok status, instead Im getting an ERROR IN MULTIPART INITIALIZATION status.
Has anybody tried sending this kind of http request? Any idea how to get this working properly?
Thanks