Advertisement
Guest User

Untitled

a guest
Mar 20th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. my $tx = $ua->build_tx(POST => 'https://android.googleapis.com/gcm/send' => $headers =>
  2. form => { registration_id => 'APA',
  3. collapse_key => 'foo',
  4. 'data.payload' => $payload } );
  5. $tx = $ua->start($tx);
  6.  
  7. -- Blocking request (https://android.googleapis.com/gcm/send)
  8. -- Connect 10f7c2dc01008c9f8faa34b4b1bf7bbd (https://android.googleapis.com:443)
  9. -- Client >>> Server (https://android.googleapis.com/gcm/send)
  10. POST /gcm/send HTTP/1.1\x0d
  11. User-Agent: Mojolicious (Perl)\x0d
  12. Connection: keep-alive\x0d
  13. Content-Type: application/x-www-form-urlencoded\x0d
  14. Accept-Encoding: gzip\x0d
  15. Content-Length: 407\x0d
  16. Host: android.googleapis.com\x0d
  17. Authorization: key=Ac\x0d
  18. \x0d
  19. collapse_key=foo&data.payload=%7B%22android%22:%7B%22alert%22:%22alerthere%22,%22badge%22:%22%2B2%22,%22title%22:%22titlehere%22,%22tickerText%22:%22foo+bar+long+crap+here+blah+blah+blah%22%7D,%22token%22:1234,%22msgtype%22:1%7D&registration_id=AP
  20. -- Client <<< Server (https://android.googleapis.com/gcm/send)
  21. HTTP/1.1 200 OK\x0d
  22. Content-Type: text/plain; charset=UTF-8\x0d
  23. Date: Sat, 21 Mar 2015 03:11:01 GMT\x0d
  24. Expires: Sat, 21 Mar 2015 03:11:01 GMT\x0d
  25. Cache-Control: private, max-age=0\x0d
  26. X-Content-Type-Options: nosniff\x0d
  27. X-Frame-Options: SAMEORIGIN\x0d
  28. X-XSS-Protection: 1; mode=block\x0d
  29. Server: GSE\x0d
  30. Alternate-Protocol: 443:quic,p=0.5\x0d
  31. Accept-Ranges: none\x0d
  32. Vary: Accept-Encoding\x0d
  33. Transfer-Encoding: chunked\x0d
  34. \x0d
  35. 26\x0d
  36. id=0:14218cc6\x0d
  37. 0\x0d
  38.  
  39. my $tx = $ua->build_tx(POST => 'https://android.googleapis.com/gcm/send' => $headers =>
  40. form => { registration_id => 'APA',
  41. collapse_key => 'foo',
  42. 'data.payload' => $payload } );
  43. $tx = $ua->start($tx => sub{});
  44.  
  45. -- Non-blocking request (https://android.googleapis.com/gcm/send)
  46. -- Connect ea59f7dbaab5118a80d680892718e8aa (https://android.googleapis.com:443)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement