I'm trying to access a Google Protocol RPC API with jQuery like this:
jQuery.ajax({
url: some_url,
type: "POST",
data : some_params,
contentType: "application/json; charset=utf-8",
dataType : "json",
success : function (data) {
console.log(data);
},
error : function (xhr, status, errorThrown) {
console.log(xhr);
}
});
But I only get the following error message:
XMLHttpRequest cannot load https://*****. Response for preflight has invalid HTTP status code 400
How can I return an OPTIONS
method in ProtoRPC, that I don't get this error anymore?