|
NAMEWWW::OAuth::Request::HTTP_Request - HTTP Request container for HTTP::RequestSYNOPSISmy $req = WWW::OAuth::Request::HTTP_Request->new(request => $http_request); $req->request_with(LWP::UserAgent->new); DESCRIPTIONWWW::OAuth::Request::HTTP_Request is a request container for WWW::OAuth that wraps a HTTP::Request object, which can be used by several user-agents like LWP::UserAgent, HTTP::Thin, and Net::Async::HTTP. It performs the role WWW::OAuth::Request.ATTRIBUTESWWW::OAuth::Request::HTTP_Request implements the following attributes.requestmy $http_request = $req->request; $req = $req->request(HTTP::Request->new(GET => $url)); HTTP::Request object to authenticate. METHODSWWW::OAuth::Request::HTTP_Request composes all methods from WWW::OAuth::Request, and implements the following new ones.contentmy $content = $req->content; $req = $req->content('foo=1&bar=2'); Set or return request content from "request". content_is_formmy $bool = $req->content_is_form; Check whether "request" has single-part content and a "Content-Type" header of "application/x-www-form-urlencoded". headermy $header = $req->header('Content-Type'); $req = $req->header(Authorization => 'Basic foobar'); Set or return a request header from "request". methodmy $method = $req->method; $req = $req->method('GET'); Set or return request method from "request". request_with$http_response = $req->request_with(LWP::UserAgent->new); Run request with passed user-agent object, and return HTTP::Response object. User-agent may be LWP::UserAgent, HTTP::Thin, or Net::Async::HTTP. If run with Net::Async::HTTP, the return value is a Future yielding the HTTP::Response object as in "do_request" in Net::Async::HTTP. urlmy $url = $req->url; $req = $req->url('http://example.com/api/'); Set or return request URL from "request". BUGSReport any issues on the public bugtracker.AUTHORDan Book <dbook@cpan.org>COPYRIGHT AND LICENSEThis software is Copyright (c) 2015 by Dan Book.This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) SEE ALSOLWP::UserAgent, HTTP::Thin, Net::Async::HTTP
Visit the GSP FreeBSD Man Page Interface. |