Skip to content

Instantly share code, notes, and snippets.

@segdeha
Last active October 28, 2015 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save segdeha/1f6ef6c0195262c57074 to your computer and use it in GitHub Desktop.
Save segdeha/1f6ef6c0195262c57074 to your computer and use it in GitHub Desktop.
Smallest possible Ajax implementation of POST requests (195 characters)
function p(u,p,c){var x=new XMLHttpRequest;x.open('POST',u);x.setRequestHeader('Content-type','application/x-www-form-urlencoded');x.onreadystatechange=function(){3<x.readyState&&c(x)};x.send(p)}
@segdeha
Copy link
Author

segdeha commented Oct 27, 2015

@segdeha
Copy link
Author

segdeha commented Oct 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment