Comm.makeWebRequest error 400

Former Member
Former Member
Hi,
I'm trying to use Communication for retrieving a json that is on my website.
I thought it was pretty simple, but it didn't seems to be :

function retrieveWSInfo() {
var url = "cutoffcourse.com/.../toto";

Comm.makeWebRequest(
url,
{"format" => "json"},
{
:method=>Comm.HTTP_REQUEST_METHOD_GET

},
method(:onResponse)
);

}

function onResponse(responseCode, data) {
Sys.println("Received code " + responseCode);
Sys.println("Received data " + data);

var prop = "";
if(responseCode == 200) {
prop = data["propert"];
Sys.println(" new prop = "+prop);
} else {
prop = Application.getApp().getProperty("propertiesGlobal");
Sys.println("we keep old prop = "+prop);
}
}



But I receive a -400 code, and a data null.

Do you have an idea of what is wrong ?