My front-end development framework's cURL implementation requires all curl options be entered as raw text strings (text/plain). This is causing me all sorts of headaches with such things as posting multipart/mixed forms (i.e. FaxOut API requests).
For example, this works perfectly for me in Shell terminal but not in my front-end environment:
P.S. Any other solution or workaround would be welcomed.
For example, this works perfectly for me in Shell terminal but not in my front-end environment:
curl -X POST "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/fax"; --header "Content-Type: multipart/mixed; boundary=Boundary_1_14413901_1361871080888" --header "Accept: application/json" --header "Authorization: Bearer { {access_token}}" -d "--Boundary_1_14413901_1361871080888When I try the same command from my front-end I get:
Content-Type: application/json
{
\"to\":[{\"phoneNumber\":\"18005630003\"}],
\"faxResolution\":\"High\",
\"sendTime\":\"2013-02-26T09:31:20.882Z\"
}
--Boundary_1_14413901_1361871080888
Content-Type: text/plain
Hello, World!
--Boundary_1_14413901_1361871080888--"
{ "message" : "Bad Request",The cURL http scripting docs recommend using "--form" commands for RFC1867 posting. If correct, can you provide some working examples for Faxing and MMS of how boundaries and content-types would be specified when using "-F" options?
"errors" : [ ]
}
P.S. Any other solution or workaround would be welcomed.