I am making a POST request from IE using XDomainRequest . XDomainRequest does not send a Content-Type to its header, and cannot set a custom header . I think this causes PHP to not post post variables in $_POST .
I see that the parameters are sent if I use file_get_contents("php://input") , but I'm not sure how to parse them correctly without breaking them. Is there a way to get PHP to collect POST parameters? Or how can I get the variables safely?
I use this transport to get XDomainRequest in jQuery and make this call:
jQuery.post('http://domain.de/io/login', ' email=test2@stuff.de &password=xxx', function(response) { if (console) console.log(response); alert('response: ' + objectToString(response)); });
On the PHP side, I have:
print_r($_REQUEST, true); echo file_get_contents("php://input");
Works great with Firefox. But Firefox does not use transport.
source share