Domanda

Voglio inviare dati su YouTube tramite Metodo post. Scrivo io http.open ("post", myurl, vero); nel codice come seguente

var myUrl = "https://gdata.youtube.com/action/GetUploadToken";
 http.open("POST", myUrl, true);
            http.setRequestHeader("Authorization", "AuthSub token=" + code);
            http.setRequestHeader("GData-Version", 2);
            http.setRequestHeader("X-GData-Key", "key="+dev_key);
            http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

Ma l'errore è

Request URL:https://gdata.youtube.com/action/GetUploadToken
Request Method:OPTIONS
Status Code:405 Method Not Allowed

Gentilmente dimmi cosa c'è che non va qui

È stato utile?

Soluzione

Ajax non ti consente di inviare una richiesta a domini diversi da quello che ospita il codice?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top