curl -X POST \
some.webpage.com/.../call \
-H 'content-type: application/json' \
-H 'x-access-token: 123321-2323232-1233444' \
-d '{"x": "123", "y":"456", "z": { "z1": "789"}}'
I tried the following, but it didn't work:
Comm.makeWebRequest(
//URL
"some.webpage.com/.../call",
//parameter
{"x"=>"123", "y"=>"456", "z"=>{"z1"=>"789"}},
//options
{
:method=>Comm.HTTP_REQUEST_METHOD_POST,
:headers=>{ "x-access-token"=>accessToken, "Content-Type"=>Comm.REQUEST_CONTENT_TYPE_JSON },
:responseType=>Comm.HTTP_RESPONSE_CONTENT_TYPE_JSON
},
//callback
method(:onResponse)
);
Is the issue related to the nesting in "z": { "z1": "789"} ?
Does anyone have a working example for POST with nested JSON Request-Body
Thanks for any hints !!