2

次のようにjQueryを使用してGoogle Protocol RPC APIにアクセスしようとしています:

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);
    }
});

しかし、次のエラーメッセージしか表示されません。

XMLHttpRequest cannot load https://*****. Response for preflight has invalid HTTP status code 400 

ProtoRPC でメソッドを返して、OPTIONSこのエラーが発生しないようにするにはどうすればよいですか?

4

0 に答える 0