[jQuery] Corrupt ajax requests?
Suddenly Ajax no longer seems to perform well formatted POST requests.
Consider the following call:
jQuery.ajax({
type:'POST',
dataType:'text',
url:'ajax.php',
data:({
testParamOne:1,
testParamTwo:2
})
});
And ajax.php:
<?php
echo var_export($_POST,1);
When executed, this is displayed in the Post tab of the request in
Firebug:
testParamOne=1&testParamTwo=2
and the Response tab:
array (
)
It appears that whatever jQuery is sending, it certainly isn't a valid
POST request! There is no reference of any of the two parameters in
the URL either.
What is wrong?