cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5006
Views
1
Helpful
2
Replies

URL API:No 'Access-Control-Allow-Origin' header is present on the requested resource.

jromaccent
Level 1
Level 1

Hello,

I get this error whenever I initiate a get or post request.

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

I've tried IE, Chrome and Firefox.

I was able to log in using the standard form post method in the documentation's sample codes.

However, I can't seem to initiate php calls using jquery get/post, ajax or mootools request get/post.

If anyone can provide a sample request using jquery, it would be very helpful.

Thanks!

2 Replies 2

nmorrow
Cisco Employee
Cisco Employee

Hello,

     This is a browser security measure that may work properly in Safari. I have successfully used the XMLHttpRequest object cross domain in Safari successfully, but get the same security errors in Firefox and Chrome. URL API is intended to be used nearly entirely in an HTML form environment using POST method. For new development, we generally recommend XML API (HTTPS POST), along with server side communication or traditional application, rather than browser app.

Thanks Nathan!