Skip to content

Instantly share code, notes, and snippets.

@shadow-fox
Created January 8, 2014 07:00
Show Gist options
  • Save shadow-fox/8312882 to your computer and use it in GitHub Desktop.
Save shadow-fox/8312882 to your computer and use it in GitHub Desktop.
jQuery ajax post
$.post('http://rest.api/login', {
loginData : { identity : identity, password : password },
}).then(function (result) {
console.log(result);
});
}
Response Headers
Connection Keep-Alive
Content-Encoding gzip
Content-Length 1707
Content-Type text/html
Date Wed, 08 Jan 2014 06:59:28 GMT
Keep-Alive timeout=5, max=100
Server Apache/2.4.6 (Ubuntu)
Vary Accept-Encoding
X-Powered-By PHP/5.5.7-1+sury.org~precise+1
Request Headers
Accept */*
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Content-Length 57
Content-Type application/x-www-form-urlencoded; charset=UTF-8
Host rest.api
Origin http://localhost:8000
Referer http://localhost:8000/login
User-Agent Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment