jaxb
jaxb

Reputation: 2077

Ajax https request issue

When I am calling a REST service through AJAX, its working fine. I am calling it with the URL staring with HTTP e.g.: http://www.myserver.com/customers. Its works really great.

But when I am calling a same URL but with HTTPs e.g.: https://www.myserver.com/customers, I am not getting any response from server.

Its not working for GET or POST both. Its not working in Mac firefox, actually I am developing an application for iPhone using phonegap framework. Its also not working in iPhone simulator's mobile safari. Can anyone here know what problem is this? And how to solve this?

Upvotes: 1

Views: 2569

Answers (2)

sushil bharwani
sushil bharwani

Reputation: 30217

It could probably be because of same origin policy. read

http://en.wikipedia.org/wiki/Same_origin_policy

Upvotes: 0

David Hedlund
David Hedlund

Reputation: 129832

The requesting domain must match the requested domain down to the protocol, according to the Same Origin Policy

Upvotes: 1

Related Questions