Created
October 8, 2012 23:37
-
-
Save weltonrodrigo/3855636 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Mojo::UserAgent; | |
use v5.10; | |
my $ua = new Mojo::UserAgent; | |
my $tx = $ua->build_tx(GET => 'www.google.com.br'); | |
say $tx->req->to_string; | |
$tx->req->headers->referrer('http://www.bing.com'); | |
say $tx->req->to_string;; | |
__END__ | |
GET / HTTP/1.1 | |
Content-Length: 0 | |
Host: www.google.com.br | |
GET / HTTP/1.1 | |
Content-Length: 0 | |
Host: www.google.com.br |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment