I am confused about these protocols. which requests are available in case of using these protocols:
- HTTP to HTTP
- HTTPS to HTTP
- HTTP to HTTPS
- HTTPS to HTTPS
I have a domain in HTTPS and a sub-domain in HTTP. Can I request from HTTPS to HTTP (POST and GET ) to retrieve data?
for example:
$.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>"
);
});
}
this request is sent from: https://domainName.com/
Whats more I solved CORS problem in sub-domain.