AJAX=new XMLHttpRequest();
AJAX.open( 'POST', 'www.YourUrl.com', true );
AJAX.send( 'postKey=postVal' );
AJAX.onreadystatechange = function(){ console.log( AJAX ); }
This prints everything, not just a successful response. Very useful for learning about the XMLHttpRequest object and reading POST responses inside an authenticated session without any cross-domain trickery.
No comments:
Post a Comment