Advertisement
Guest User

ajax call request headers

a guest
Apr 13th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. var jqXHR = $.ajax({
  2. url: serverLink+action,
  3. type: "POST",
  4. data: "access_token="+accessToken+"&uid="+uid,
  5. crossDomain: true,
  6. success: function(resp, status, jqXHR){
  7. var header = jqXHR.getAllResponseHeaders();
  8. var match = header.match(/(Set-Cookie|set-cookie): (.+?);/);
  9. if (match) session = match[2];
  10. console.log(jqXHR, header, session)
  11. },
  12. error: function (jqXHR, status, error) {
  13. console.log(jqXHR.getAllResponseHeaders());
  14. }
  15. })
  16. console.log(jqXHR.getAllResponseHeaders())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement