.\" Automatically generated by Pod::Man 4.10 (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 "WWW::OAuth::Request 3pm" .TH WWW::OAuth::Request 3pm "2018-12-19" "perl v5.28.1" "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" WWW::OAuth::Request \- HTTP Request container role .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Role::Tiny::With; \& with \*(AqWWW::OAuth::Request\*(Aq; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" WWW::OAuth::Request is a Role::Tiny role that provides a consistent interface to WWW::OAuth for parsing and authenticating requests. See \&\*(L"\s-1HTTP REQUEST CONTAINERS\*(R"\s0 in WWW::OAuth for specifics. .SH "METHODS" .IX Header "METHODS" WWW::OAuth::Request implements or requires the following methods. .SS "body_pairs" .IX Subsection "body_pairs" .Vb 1 \& my $pairs = $req\->body_pairs; .Ve .PP Return body parameters from \f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR \*(L"content\*(R" as an even-sized arrayref of keys and values. .SS "content" .IX Subsection "content" .Vb 2 \& my $content = $req\->content; \& $req = $req\->content(\*(Aqfoo=1&baz=2\*(Aq); .Ve .PP Set or return request content. Must be implemented to compose role. .SS "content_is_form" .IX Subsection "content_is_form" .Vb 1 \& my $bool = $req\->content_is_form; .Ve .PP Check whether content is single-part and content type is \&\f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR. Must be implemented to compose role. .SS "header" .IX Subsection "header" .Vb 2 \& my $header = $req\->header(\*(AqContent\-Type\*(Aq); \& $req = $req\->header(\*(AqContent\-Type\*(Aq => \*(Aqapplication/x\-www\-form\-urlencoded\*(Aq); .Ve .PP Set or return a request header. Multiple values can be set by passing an array reference as the value, and multi-value headers are joined on \f(CW\*(C`, \*(C'\fR when returned. Must be implemented to compose role. .SS "method" .IX Subsection "method" .Vb 2 \& my $method = $req\->method; \& $req = $req\->method(\*(AqGET\*(Aq); .Ve .PP Set or return request method. Must be implemented to compose role. .SS "query_pairs" .IX Subsection "query_pairs" .Vb 1 \& my $pairs = $req\->query_pairs; .Ve .PP Return query parameters from \*(L"url\*(R" as an even-sized arrayref of keys and values. .SS "request_with" .IX Subsection "request_with" .Vb 1 \& my $res = $req\->request_with($ua); .Ve .PP Send request using passed user-agent object, and return response. Must be implemented to compose role. .SS "url" .IX Subsection "url" .Vb 2 \& my $url = $req\->url; \& $req = $req\->url(\*(Aqhttp://example.com/api/\*(Aq); .Ve .PP Set or return request \s-1URL.\s0 Must be implemented to compose role. .SH "BUGS" .IX Header "BUGS" Report any issues on the public bugtracker. .SH "AUTHOR" .IX Header "AUTHOR" Dan Book .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2015 by Dan Book. .PP This is free software, licensed under: .PP .Vb 1 \& The Artistic License 2.0 (GPL Compatible) .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" HTTP::Request, Mojo::Message::Request