Ich bin verwirrt über diese Protokolle. die Anfragen sind, falls verfügbar, um diese Protokolle zu verwenden:Https zu http Anfrage
- HTTP auf HTTP
- HTTPS
- HTTP zu HTTPS
- HTTPS zu HTTPS
Ich habe eine Domain in HTTPS und eine Subdomain in HTTP. Kann ich von HTTPS zu HTTP (POST und GET) anfordern, um Daten abzurufen?
zum Beispiel:
$.getJSON('http://api.domainName.com/api/Visitor/GetStates/' + countryId, function(data) {
$.each(data, function(key, value) {
$("#StateId").html($("#StateId").html() +
"<option value='" +
value.StateId +
"'>" +
value.StateName +
"</option>"
);
});
}
diese Anfrage aus gesendet wird: https://domainName.com/
Was mehr ich CORS Problem in Sub-Domain gelöst.
HTTP-Anfragen von einer sicheren Website ist nicht erlaubt. Der Rest ist in Ordnung. – William
@William ist mein Code erlaubt? – Afsaneh
Leider nicht, wenn die Seite, die die Anfrage stellt, über https ist. – William