I am making a POST request from IE using XDomainRequest. XDomainRequest does not sent a Content-Type in his header and it is not possible to set a custom header. I think this causes PHP to not place the post variables in $_POST
.
I can see the parameters are send if I use file_get_contents("php://input")
but I am not sure how to parse them correctly without breaking them. Is there a way to force PHP to collect the POST parameters? Or how can I get the variables safely?
I am using 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 fine with Firefox. But Firefox does not use the transport.