I need to use AJAX to get the content of another page located on a different server from the one the AJAX is loaded from. The AJAX needs to send a POST request then return the result. how can i do this?
+3
A:
Set up proxy on your own server. Have your server call theirs and return the result.
Diodeus
2009-11-27 19:36:23
I can't. My server will only let me use GET to request external web pages.
Jcubed
2009-11-27 19:40:14
+2
A:
There is no way to go around that policy. This policy is there for very good reasons. That is also no problem as long as you're in control over the web application. You could simply redirect the call to the other server from your webserver and pass the result. This would work out like a proxy.
Sebastian P.R. Gingter
2009-11-27 19:38:21
+2
A:
if you control both servers, you can use one of the HTTP header fields for cross-origin resource sharing:
Jason S
2009-11-27 19:38:59
A:
Mic
2009-11-27 19:57:24