.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTTP::Tiny::UA 3" .TH HTTP::Tiny::UA 3 "2018-04-22" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTTP::Tiny::UA \- Higher\-level UA features for HTTP::Tiny .SH "VERSION" .IX Header "VERSION" version 0.006 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use HTTP::Tiny::UA; \& \& my $ua = HTTP::Tiny::UA\->new( \& ... \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module extends HTTP::Tiny with higher-level convenience features. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 1 \& $http = HTTP::Tiny::UA\->new( %attributes ); .Ve .PP This is inherited from HTTP::Tiny. The only difference so far is that \&\f(CW\*(C`agent\*(C'\fR will be \f(CW\*(C`HTTP\-Tiny\-UA/$VERSION\*(C'\fR. .IP "\(bu" 4 \&\f(CW\*(C`agent\*(C'\fR .Sp A user-agent string (defaults to 'HTTP\-Tiny\-UA/$VERSION'). If \f(CW\*(C`agent\*(C'\fR ends in a space character, the default user-agent string is appended. .IP "\(bu" 4 \&\f(CW\*(C`cookie_jar\*(C'\fR .Sp An instance of HTTP::CookieJar or equivalent class that supports the \f(CW\*(C`add\*(C'\fR and \f(CW\*(C`cookie_header\*(C'\fR methods .IP "\(bu" 4 \&\f(CW\*(C`default_headers\*(C'\fR .Sp A hashref of default headers to apply to requests .IP "\(bu" 4 \&\f(CW\*(C`local_address\*(C'\fR .Sp The local \s-1IP\s0 address to bind to .IP "\(bu" 4 \&\f(CW\*(C`max_redirect\*(C'\fR .Sp Maximum number of redirects allowed (defaults to 5) .IP "\(bu" 4 \&\f(CW\*(C`max_size\*(C'\fR .Sp Maximum response size (only when not using a data callback). If defined, responses larger than this will return an exception. .IP "\(bu" 4 \&\f(CW\*(C`proxy\*(C'\fR .Sp \&\s-1URL\s0 of a proxy server to use (default is \f(CW$ENV{http_proxy}\fR if set) .IP "\(bu" 4 \&\f(CW\*(C`no_proxy\*(C'\fR .Sp List of domain suffixes that should not be proxied. Must be a comma-separated string or an array reference. (default is \f(CW$ENV{no_proxy}\fR) .IP "\(bu" 4 \&\f(CW\*(C`timeout\*(C'\fR .Sp Request timeout in seconds (default is 60) .IP "\(bu" 4 \&\f(CW\*(C`verify_SSL\*(C'\fR .Sp A boolean that indicates whether to validate the \s-1SSL\s0 certificate of an \f(CW\*(C`https\*(C'\fR connection (default is false) .IP "\(bu" 4 \&\f(CW\*(C`SSL_options\*(C'\fR .Sp A hashref of \f(CW\*(C`SSL_*\*(C'\fR options to pass through to IO::Socket::SSL .PP See \s-1SSL SUPPORT\s0 in HTTP::Tiny for more on the \&\f(CW\*(C`verify_SSL\*(C'\fR and \f(CW\*(C`SSL_options\*(C'\fR attributes. .SS "get|head|put|post|post_form|mirror|delete" .IX Subsection "get|head|put|post|post_form|mirror|delete" These methods are inherited from HTTP::Tiny and work the same, except they invoke the HTTP::Tiny::UA request method and return a HTTP::Tiny::UA::Response object. .SS "request" .IX Subsection "request" .Vb 1 \& my $res = HTTP::Tiny\->new\->get( $url ); .Ve .PP Just like HTTP::Tiny::request, but returns a HTTP::Tiny::UA::Response object. All other \f(CW\*(C`get\*(C'\fR, \f(CW\*(C`post\*(C'\fR, etc. methods eventually invoke this one so all such methods return response objects now. .SH "EXCEPTIONS" .IX Header "EXCEPTIONS" Exceptions from \f(CW\*(C`max_size\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR or other error conditions will result in a pseudo-HTTP status code of 599 and a reason of \*(L"Internal Exception\*(R". The content field in the response will contain the text of the exception. .SH "CONTRIBUTING" .IX Header "CONTRIBUTING" Unlike HTTP::Tiny, this module is open to additional features. Please discuss new ideas on the bug tracker for feedback before implementing. .PP While this module is not strictly \*(L"Tiny\*(R", here are some general guidelines: .IP "\(bu" 4 The goal for this module is \fBnot\fR feature/API equivalence with LWP::UserAgent .IP "\(bu" 4 Core module dependencies and \*(L"Tiny\*(R"\-ish module dependencies are \s-1OK\s0 .IP "\(bu" 4 Other \s-1CPAN\s0 modules should be used sparingly and only for good reasons .IP "\(bu" 4 Any \s-1XS\s0 dependencies must be optional .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 HTTP::Tiny — the underlying client .IP "\(bu" 4 HTTP::Thin — another HTTP::Tiny extension that uses HTTP::Message objects .IP "\(bu" 4 LWP::UserAgent — when you outgrow HTTP::Tiny, use this .SH "SUPPORT" .IX Header "SUPPORT" .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests through the issue tracker at . You will be notified automatically of any progress on your issue. .SS "Source Code" .IX Subsection "Source Code" This is open source software. The code repository is available for public review and contribution under the terms of the license. .PP .PP .Vb 1 \& git clone https://github.com/dagolden/HTTP\-Tiny\-UA.git .Ve .SH "AUTHOR" .IX Header "AUTHOR" David Golden .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Felipe Gasper .IP "\(bu" 4 Graham Ollis .IP "\(bu" 4 Michael G. Schwern .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2013 by David Golden. .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve