Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $tx = $ua->build_tx(POST => 'https://android.googleapis.com/gcm/send' => $headers =>
- form => { registration_id => 'APA',
- collapse_key => 'foo',
- 'data.payload' => $payload } );
- $tx = $ua->start($tx);
- -- Blocking request (https://android.googleapis.com/gcm/send)
- -- Connect 10f7c2dc01008c9f8faa34b4b1bf7bbd (https://android.googleapis.com:443)
- -- Client >>> Server (https://android.googleapis.com/gcm/send)
- POST /gcm/send HTTP/1.1\x0d
- User-Agent: Mojolicious (Perl)\x0d
- Connection: keep-alive\x0d
- Content-Type: application/x-www-form-urlencoded\x0d
- Accept-Encoding: gzip\x0d
- Content-Length: 407\x0d
- Host: android.googleapis.com\x0d
- Authorization: key=Ac\x0d
- \x0d
- 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®istration_id=AP
- -- Client <<< Server (https://android.googleapis.com/gcm/send)
- HTTP/1.1 200 OK\x0d
- Content-Type: text/plain; charset=UTF-8\x0d
- Date: Sat, 21 Mar 2015 03:11:01 GMT\x0d
- Expires: Sat, 21 Mar 2015 03:11:01 GMT\x0d
- Cache-Control: private, max-age=0\x0d
- X-Content-Type-Options: nosniff\x0d
- X-Frame-Options: SAMEORIGIN\x0d
- X-XSS-Protection: 1; mode=block\x0d
- Server: GSE\x0d
- Alternate-Protocol: 443:quic,p=0.5\x0d
- Accept-Ranges: none\x0d
- Vary: Accept-Encoding\x0d
- Transfer-Encoding: chunked\x0d
- \x0d
- 26\x0d
- id=0:14218cc6\x0d
- 0\x0d
- my $tx = $ua->build_tx(POST => 'https://android.googleapis.com/gcm/send' => $headers =>
- form => { registration_id => 'APA',
- collapse_key => 'foo',
- 'data.payload' => $payload } );
- $tx = $ua->start($tx => sub{});
- -- Non-blocking request (https://android.googleapis.com/gcm/send)
- -- Connect ea59f7dbaab5118a80d680892718e8aa (https://android.googleapis.com:443)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement