Zoho Creator postUrl "Content Type (415)" Error
I have a simple postUrl script in a Zoho Creator App to receive an authentication key from an internal application. See below:
myHeader=map();
myMap=map();
myHeader.put("Content_Type","application/json");
myHeader.put("Accept", "application/json");
myMap.put("userName","
xxxxx@xxxxxx.com");
myMap.put("apiKey","xxxxxxxxxxxxxxxxxxxxxxxxxxx");
resp = postUrl("
http://test.myeddy.info/habi-ws-ergon/api/v1/token", myMap, myHeader,false);
info resp;
However, It gives back a 415 HTTP error which I believe relates to the content type of the server API.
The following curl command works fine:
curl -i -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"userName":"
xxxx@xxxxxx.com", "apiKey":"xxxxxxxxxxxxxxxxxxxxxxxxx"}'
http://test.myeddy.info/habi-ws-ergon/api/v1/token
Is there something obvious I am missing?
Any help much appreciated
KW