Did anyone mange to receive a response with cURL or WinHTTP?
cURL:
Authorization etc. works, I ?ve even copied the cURL line that you can copy from postman. I always get the error “No locations found”.
This is the code I ?ve tried in curl:
curl --request POST --url https://api.routexl.nl/tour/ \
--header ‘authorization: Basic blablabla’ \
--header ‘content-type: multipart/form-data; boundary=—011000010111000001101001’ \
--form ‘locations=[{“address”:“Start”,“lat”:“50.111512”,“lng”:“8.680506”},{“address”:“SAX15045538”,“lat”:“49.65228”,“lng”:“10.3277”},{“address”:“SAX15045849”,“lat”:“49.8177055”,“lng”:“10.3531641”},{“address”:“SAX15053738”,“lat”:“51.0496968”,“lng”:“6.2252342”},{“address”:“End”,“lat”:“50.111512”,“lng”:“8.680506”}]’
WinHTTP:
The problem here is that I can ?t find a way to tell WinHTTP where to put the request body with the locations.
This is the code I ?ve tried in C/AL:
CLEAR(winHTTP);
CREATE(winHTTP,FALSE,TRUE);
winHTTP.Open(‘POST’,'https://api.routexl.nl/tour/’) “Link https//apiroutexlnl/tour/”);
winHTTP.SetCredentials('myuser,‘mypassword’,0);
winHTTP.SetRequestHeader(‘Content-Type’,‘application/json’);
winHTTP.Send(‘locations=[{“address”:“Start”,“lat”:“50.111512”,“lng”:“8.680506”},{“address”:“SAX15045538”,“lat”:“49.65228”,“lng”:“10.3277”},{“address”:“SAX15045849”,“lat”:“49.8177055”,“lng”:“10.3531641”},{“address”:“SAX15053738”,“lat”:“51.0496968”,“lng”:“6.2252342”},{“address”:“End”,“lat”:“50.111512”,“lng”:“8.680506”}]’);
But same result here: “No locations found”
Any help would really be appreciated.
Thanks up front.