Skip to content

Commit

Permalink
added example for custom cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 8, 2015
1 parent 677f1c6 commit ab8be9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -513,6 +513,16 @@ L<Mojo::UserAgent::CookieJar> object.
# Disable extraction of cookies from responses
$ua->cookie_jar->extracting(0);
# Add custom cookie to the jar
$ua->cookie_jar->add(
Mojo::Cookie::Response->new(
name => 'foo',
value => 'bar',
domain => 'mojolicio.us',
path => '/perldoc'
)
);
=head2 inactivity_timeout
my $timeout = $ua->inactivity_timeout;
Expand Down

0 comments on commit ab8be9b

Please sign in to comment.