Forum /
Sencha General Forums /
Community Discussion /
405 . Method not allowed.
405 . Method not allowed.
Whenever I tried to call the web service using Ext.Ajax.Request with method type as POST , it automatically changes it to OPTIONS and following error is occrued :-
405. That’s an error. The request method OPTIONS is inappropriate for the URL /maps.
Can anybody help me to tell why it's method type is automatically changes to OPTIONS but i m giving it as POST.
Sencha - Senior Forum Manager
Are you loading cross domain? The browser has to send an OPTIONS request to check if the server supports CORS.
405. Method not Allowed.
405. Method not Allowed.
Thanks for the reply Michell.
I am try to call the google maps service with Ext.Ajax.Request.
The code which i use to call the service is:-
Ext.Ajax.request({
url : 'http://www.google.com/maps',
method:'GET',
params: {
q: 'restaurant',
sll: '23.00,72.00',
radius:'2000',
output:'json'
},
callback: function(response){
if(response && response.responseText){
alert('hello');
console.log(response.responseText);
}
},
});
Whenever I call this , the following error is occured in the console of chrome :-
[/COLOR]
[COLOR=red !important]XMLHttpRequest cannot load http://www.google.com/maps?_dc=13499...00&output=json . Origin null is not allowed by Access-Control-Allow-Origin.
[/COLOR]
Please tell me the problem where I went wrong.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us