1WWW::Shorten::UserAgentU(s3e)r Contributed Perl DocumentaWtWiWo:n:Shorten::UserAgent(3)
2
3
4

NAME

6       WWW::Shorten::UserAgent - LWP::UserAgent subclass for WWW::Shorten
7       modules.
8

SYNOPSIS

10         use strict;
11         use warnings;
12         use WWW::Shorten::UserAgent;
13         use Try::Tiny qw(try catch);
14
15         my $ua = WWW::Shorten::UserAgent->new;
16
17         my $resp = try {
18           $ua->get($url);
19         }
20         catch {
21           warn "Uh oh: $_";
22           return undef;
23         };
24

DESCRIPTION

26       Subclass of LWP::UserAgent which works the same way as the superclass
27       except that it throws an exception if the "get" or "post" method
28       returns an error.
29
30       See LWP::UserAgent for the full documentation.
31

METHODS

33   get
34       Makes an HTTP GET request and throws an exception on error.
35
36   post
37       Makes an HTTP POST request and throws an exception on error.
38

AUTHOR

40       Dave Cross <dave@mag-sol.com>
41
43       Copyright (c) Magnum Solutions Ltd., 2012. All rights reserved.
44
45       This module is free software.  You can redistribute it and/or modify it
46       under the terms of the Artistic License 2.0.
47
48       This program is distributed in the hope that it will be useful, but
49       without any warranty; without even the implied warranty of
50       merchantability or fitness for a particular purpose.
51

SEE ALSO

53       WWW::Shorten
54
55
56
57perl v5.36.0                      2022-07-22        WWW::Shorten::UserAgent(3)
Impressum