Skip to content

Commit

Permalink
another Tor example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 25, 2014
1 parent bd5b564 commit 50319ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -388,6 +388,11 @@ Mojo::UserAgent - Non-blocking I/O HTTP and WebSocket user agent
# Scrape the latest headlines from a news site with CSS selectors
say $ua->get('blogs.perl.org')->res->dom('h2 > a')->text->shuffle;
# Search DuckDuckGo anonymously through Tor
$ua->proxy->http('socks://127.0.0.1:9050');
say $ua->get('api.3g2upl4pq6kufc4m.onion/?q=mojolicious&format=json')
->res->json('/Abstract');
# IPv6 PUT request with content
my $tx
= $ua->put('[::1]:3000' => {'Content-Type' => 'text/plain'} => 'Hello!');
Expand Down

0 comments on commit 50319ad

Please sign in to comment.