Advertisement
Liamm

Get CSRF Token Callofduty.com

Nov 30th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getCSRF() {
  2.     var url = {
  3.         method: 'GET',
  4.         uri:"https://profile.callofduty.com/",
  5.         headers: {
  6.             'Content-Type': 'application/json'
  7.         },
  8.     };
  9.     request(url, (err, response, body) => {
  10.         var token = response.headers['set-cookie'][2].replace("XSRF-TOKEN=", "").replace("; Domain=callofduty.com; Path=/", "");
  11.         console.log(token);
  12.     });
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement