I have tried to read a json from remote server, then i got this error.
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource"
Then i read that i need to set the datatype to jsonp
.
dataType: 'jsonp',
The problem is the json that i am getting isn't in jsonp
format, which is required by jsonp
. If i don't use jsonp i get the above error message.
How can I resolve this?