view release on metacpan or search on metacpan
lib/Acme/Constructor/Pythonic.pm view on Meta::CPAN
=head1 SYNOPSIS
use Acme::Constructor::Pythonic qw(
LWP::UserAgent
JSON
HTTP::Request
);
my $json = JSON();
my $ua = UserAgent();
my $req = Request( GET => 'http://www.example.com/foo.json' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use HTTP::Range;
use HTTP::RangeSaver;
use HTTP::RecordedSession;
use HTTP::Recorder;
use HTTP::Recorder::Httperf;
use HTTP::Request::AsCGI;
use HTTP::Request::AsCurl;
use HTTP::Request::Form;
use HTTP::Request::FromCurl;
use HTTP::Request::FromLog;
use HTTP::Request::FromTemplate;
use HTTP::Request::Generator;
use HTTP::Request::Params;
use HTTP::Request::StreamingUpload;
use HTTP::Response::CGI;
use HTTP::Response::Encoding;
use HTTP::Response::Maker;
use HTTP::Response::OnDisk;
use HTTP::Response::Parser;
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Solaris::Vmem;
use sol::inst::a;
use Solr;
use Solstice;
use SOOT::App;
use Sorauta::Cache::HTTP::Request::Image;
use Sorauta::Capture::ScreenShot;
use Sorauta::Device::USB::Synchronizer;
use Sorauta::SVN::AutoCommit;
use Sorauta::SVN::Updater;
use Sorauta::Utility;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/RemoteList.pm view on Meta::CPAN
# fetch the content
my @items;
my @srcs = $class->sources($category);
my $ua = LWP::UserAgent->new( env_proxy => 1 );
foreach my $src (@srcs) {
my $request = HTTP::Request->new(
ref $src
? ( POST => $src->[0],
[ content_type => 'application/x-www-form-urlencoded' ],
$src->[1]
)
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_simple.t view on Meta::CPAN
use strict;
use Test::More;
use Plack::Test;
use Plack::Builder;
use HTTP::Request::Common;
use HTTP::Response;
use Time::Local qw(timegm);
my $fullmoon = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
'File::Rsync', '0.43',
'File::Slurp', '9999.18',
'HTML::Form', '6.00',
'HTML::Parser', '3.68',
'HTML::TreeBuilder::LibXML', '0.12',
'HTTP::Request::AsCGI', '1.2',
'IP::Country', '2.27',
'JSON', '2.53',
'List::UtilsBy', '0.07',
'Log::Dispatch', '2.29',
'MRO::Compat', '0.11',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/eng2kor.pm view on Meta::CPAN
use Any::Moose;
use Any::Moose '::Util::TypeConstraints';
use JSON qw/decode_json/;
use Const::Fast;
use URI::Escape qw/uri_escape_utf8/;
use HTTP::Request;
use HTTP::Response;
use LWP::UserAgent;
use namespace::autoclean;
const my $GOOGLE_TRANSLATE_API_URL => "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s";
lib/Acme/eng2kor.pm view on Meta::CPAN
}
sub get_json {
my ($self, $url) = @_;
my $req = HTTP::Request->new( GET => $url );
my $ua = LWP::UserAgent->new;
my $res = $ua->request($req);
die $res->status_line, "\n" unless $res->is_success;
return decode_json($res->content);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activator.pm view on Meta::CPAN
perl-Catalyst-Plugin-ConfigLoader \
# Test::WWW::Mechanize::Catalyst \
# Catalyst::View::TT \
# Template::Timer \
# HTTP::Request::AsCGI \
# Catalyst::Plugin::Static::Simple \
# Catalyst::Engine::Apache \
# Catalyst::Action::RenderView \
# HTML::Lint \
# Catalyst::Plugin::Authentication::User::Hash \
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ActiveResource/Connection.pm view on Meta::CPAN
package ActiveResource::Connection;
use common::sense;
use parent qw(Class::Accessor::Lvalue::Fast);
use LWP::UserAgent;
use HTTP::Request;
__PACKAGE__->mk_accessors(qw(site user password));
sub ua {
LWP::UserAgent->new
lib/ActiveResource/Connection.pm view on Meta::CPAN
sub post {
my ($self, $path, $body) = @_;
my $url = $self->url($path);
my $request = HTTP::Request->new("POST", $url);
$request->header("Content-Type" => "text/xml");
$request->content($body);
return ua->request($request);
}
sub put {
my ($self, $path, $body) = @_;
my $url = $self->url($path);
my $request = HTTP::Request->new("PUT", $url);
$request->header("Content-Type" => "text/xml");
$request->content($body);
return ua->request($request);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Agent/TCLI/Package/Net/HTTP.pm view on Meta::CPAN
use Object::InsideOut qw(Agent::TCLI::Package::Base);
use POE;
use POE::Component::Client::HTTP;
use POE::Component::Client::Keepalive;
use HTTP::Request::Common qw(GET POST);
use Agent::TCLI::Command;
use Agent::TCLI::Parameter;
use Getopt::Lucid qw(:all);
our $VERSION = '0.030.'.sprintf "%04d", (qw($Id: HTTP.pm 74 2007-06-08 00:42:53Z hacker $))[2];
lib/Agent/TCLI/Package/Net/HTTP.pm view on Meta::CPAN
sub ResponseProgress {
my ($kernel, $self, $gen_args, $call_args) =
@_[KERNEL, OBJECT, ARG0, ARG1 ];
$self->Verbose("ResponseProgress: \tEntering ".$self->name." " );
my $req = $gen_args->[0]; # HTTP::Request object being serviced
my $tag = $gen_args->[1]; # Request ID tag from.
my $got = $call_args->[0]; # Number of bytes retrieved so far.
my $tot = $call_args->[1]; # Total bytes to be retrieved.
my $oct = $call_args->[2]; # Chunk of raw octets received this time.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Surf.pm view on Meta::CPAN
if(defined $query) {
$url = join "", $url, $url =~ /\?/ ? "&": "?",
Aion::Format::Url::to_url_params $query;
}
my $request = HTTP::Request->new($method => $url);
my $validate_data = sub {
die "surf: data has already been provided!" if defined $data;
die "surf: sended data in $method!" if $method =~ /^(HEAD|GET)\z/;
};
lib/Aion/Surf.pm view on Meta::CPAN
=item * LWP::Simple
=item * LWP::Simple::Post
=item * HTTP::Request::Common
=item * WWW::Mechanize
=item * LLL<https://habr.com/ru/articles/63432/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akado/Account.pm view on Meta::CPAN
use warnings FATAL => 'all';
use utf8;
use Carp;
use Digest::MD5 qw(md5_hex);
use HTTP::Request::Common;
use LWP;
use XML::XPath;
sub new {
lib/Akado/Account.pm view on Meta::CPAN
$self->_get_domain_from_cookies($browser->{cookie_jar}), # domain
);
my $url = $self->{site} . "/finance/display.xml";
my $request = HTTP::Request->new(
'GET',
$url,
);
my $response = $browser->request($request);
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-testrequests.t view on Meta::CPAN
use Test::More;
use JSON;
use Cwd 'abs_path';
use Akamai::Edgegrid;
use HTTP::Request;
use HTTP::Headers;
use URI;
use Data::Dumper;
sub load_testdata {
t/01-testrequests.t view on Meta::CPAN
$headers->header($k => $v);
}
}
}
my $request = new HTTP::Request(
$testcase->{request}->{method},
$uri,
$headers,
$testcase->{request}->{data}
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akamai/Open/Request.pm view on Meta::CPAN
use warnings;
use Moose;
use Data::UUID;
use POSIX qw(strftime);
use HTTP::Request;
use LWP::UserAgent;
use Akamai::Open::Debug;
use constant USER_AGENT => "Akamai::Open::Client/Perl-$^V";
has 'debug' => (is => 'rw', default => sub{ return(Akamai::Open::Debug->instance());});
has 'nonce' => (is => 'rw', isa => 'Str', default => \&gen_uuid, trigger => \&Akamai::Open::Debug::debugger);
has 'timestamp' => (is => 'rw', isa => 'Str', default => \&gen_timestamp, trigger => \&Akamai::Open::Debug::debugger);
has 'request' => (is => 'rw', default => sub{return(HTTP::Request->new());});
has 'response' => (is => 'rw', trigger => \&Akamai::Open::Debug::debugger);
has 'user_agent'=> (is => 'rw', default => sub {
my $agent = LWP::UserAgent->new();
$agent->timeout(600);
$agent->agent(USER_AGENT);
lib/Akamai/Open/Request.pm view on Meta::CPAN
version 0.03
=head1 ABOUT
I<Akamai::Open::Request> is the internal used request
handler, based on I<HTTP::Request> and I<LWP::UserAgent>.
=head1 AUTHOR
Martin Probst <internet+cpan@megamaddin.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alice/HTTP/Request.pm view on Meta::CPAN
package Alice::HTTP::Request;
use Alice::HTTP::Response;
use Encode;
use parent 'Plack::Request';
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
### modules required to download with lwp ###
my $use_list = {
LWP => '0.0',
'LWP::UserAgent' => '0.0',
'HTTP::Request' => '0.0',
'HTTP::Status' => '0.0',
URI => '0.0',
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/File/Fetch.pm view on Meta::CPAN
### modules required to download with lwp ###
my $use_list = {
LWP => '0.0',
'LWP::UserAgent' => '0.0',
'HTTP::Request' => '0.0',
'HTTP::Status' => '0.0',
URI => '0.0',
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
### modules required to download with lwp ###
my $use_list = {
LWP => '0.0',
'LWP::UserAgent' => '0.0',
'HTTP::Request' => '0.0',
'HTTP::Status' => '0.0',
URI => '0.0',
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/API.pm view on Meta::CPAN
use Amazon::API::Error;
use Amazon::Credentials;
use AWS::Signature4;
use Data::Dumper;
use HTTP::Request;
use JSON qw/to_json from_json/;
use LWP::UserAgent;
use Scalar::Util qw/reftype/;
use XML::Simple;
lib/Amazon/API.pm view on Meta::CPAN
sub submit {
my $self = shift;
my %options = @_;
my $request = HTTP::Request->new($self->get_http_method || 'POST', $self->get_url);
# 1. set the header
# 2. set the content
# 3. sign the request
# 4. send the request & return result
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
use URI ();
use URI::Escape ();
use Carp ();
use HTTP::Headers ();
use HTTP::Date ();
use HTTP::Request ();
use Digest::SHA ();
our $VERSION = '0.05';
sub new {
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
$http_headers,
$content
)
);
my $request = HTTP::Request->new('POST', $url, $http_headers, $content);
return $self->ua->request($request);
}
sub _cloudfront_scope {
my ($date) = @_;
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
The id of the L<< CloudFront distribution|/"Amazon CloudFront setup in a Nutshell" >>
you want to manage.
=item * C<ua> (Optional)
An LWP::UserAgent compatible object (otherwise, LWP::UserAgent will be used).
The object must provide a C<request()> method that receives an HTTP::Request
and returns a response. The responses, whatever they are, will be forwarded
to your call. Also, the object must be able to handle B<HTTPS>. If you don't
want to use LWP::UserAgent, there is a (highly incomplete) list of
alternatives below:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/Credentials.pm view on Meta::CPAN
/);
use Data::Dumper;
use Date::Format;
use Exporter;
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use POSIX::strptime qw/strptime/;
use Time::Local;
use Scalar::Util qw/reftype/;
lib/Amazon/Credentials.pm view on Meta::CPAN
# executing on an EC2 or container.
my $url = AWS_AVAILABILITY_ZONE_URL;
my $ua = ref($self) ? $self->get_user_agent : new LWP::UserAgent;
my $req = HTTP::Request->new( GET => $url );
my $region = eval {
my $rsp = $ua->request($req);
# if not 200, then get out of Dodge
lib/Amazon/Credentials.pm view on Meta::CPAN
# error ($@), or a non-200 response code
while ( ! $creds->{token} ) {
$url .= $role if $role;
my $req = HTTP::Request->new( GET => $url );
$self->get_logger->debug(Dumper [ "HTTP REQUEST:\n", $req ])
if $self->get_debug;
my $rsp = $ua->request($req);
lib/Amazon/Credentials.pm view on Meta::CPAN
if ( exists $ENV{AWS_CONTAINER_CREDENTIALS_RELATIVE_URI} ) {
# try to get credentials from instance role
my $url = sprintf("%s%s", AWS_CONTAINER_CREDENTIALS_URL, $ENV{AWS_CONTAINER_CREDENTIALS_RELATIVE_URI});
my $ua = $self->get_user_agent;
my $req = HTTP::Request->new( GET => $url );
$req->header("Accept", "*/*");
$self->get_logger->debug(Dumper [ "HTTP REQUEST:\n", $req ])
if $self->get_debug;
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
AWS::Signature4 0
B 0
ExtUtils::MakeMaker 0
Future 0
Future::Utils 0
HTTP::Request 0
IO::Async::Timer::Countdown 0
JSON::MaybeXS 0
Kavorka 0
LWP::UserAgent 0
List::MoreUtils 0
cpanfile.snapshot view on Meta::CPAN
HTTP::Daemon 6.01
HTTP::Daemon::ClientConn 6.01
requirements:
ExtUtils::MakeMaker 0
HTTP::Date 6
HTTP::Request 6
HTTP::Response 6
HTTP::Status 6
IO::Socket 0
LWP::MediaTypes 6
Sys::Hostname 0
cpanfile.snapshot view on Meta::CPAN
HTTP::Headers 6.05
HTTP::Headers::Auth 6.00
HTTP::Headers::ETag 6.00
HTTP::Headers::Util 6.03
HTTP::Message 6.06
HTTP::Request 6.00
HTTP::Request::Common 6.04
HTTP::Response 6.04
HTTP::Status 6.03
requirements:
Compress::Raw::Zlib 0
Encode 2.21
cpanfile.snapshot view on Meta::CPAN
Net::Async::HTTP::StallTimer 0.37
requirements:
Future 0.28
Future::Utils 0.16
HTTP::Cookies 0
HTTP::Request 0
HTTP::Request::Common 0
HTTP::Response 0
IO::Async::Loop 0.59
IO::Async::Stream 0.59
IO::Async::Test 0
IO::Async::Timer::Countdown 0
cpanfile.snapshot view on Meta::CPAN
HTML::HeadParser 0
HTTP::Cookies 6
HTTP::Daemon 6
HTTP::Date 6
HTTP::Negotiate 6
HTTP::Request 6
HTTP::Request::Common 6
HTTP::Response 6
HTTP::Status 6
IO::Select 0
IO::Socket 0
LWP::MediaTypes 6
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
use JSON::MaybeXS qw(decode_json encode_json);
use MIME::Base64;
use List::Util;
use List::MoreUtils;
use B qw(svref_2object);
use HTTP::Request;
use Kavorka;
use Amazon::DynamoDB::Types;
use Type::Registry;
use VM::EC2::Security::CredentialCache;
use AWS::Signature4;
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
method make_request(Str :$target,
HashRef :$payload,
) {
my $api_version = '20120810';
my $host = $self->host;
my $req = HTTP::Request->new(
POST => (($self->ssl) ? 'https' : 'http') . '://' . $self->host . ($self->port ? (':' . $self->port) : '') . '/'
);
$req->header( host => $host );
# Amazon requires ISO-8601 basic format
my $now = time;
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
$signer->sign($req);
return $req;
}
method _request(HTTP::Request $req) {
$self->implementation->request($req);
}
# Since scan and query have the same type of responses share the processing.
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
$r->{$key} = _decode_type_and_value($type, $item->{$key}->{$type});
}
return $r;
}
method _process_request(HTTP::Request $req, CodeRef $done?) {
my $current_retry = 0;
my $do_retry = 1;
try_repeat {
$do_retry = 0;
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
The following methods are intended for internal use and are documented
purely for completeness - for normal operations see L</METHODS> instead.
=head2 make_request
Generates an L<HTTP::Request>.
=head1 FUNCTIONS - Internal
=head2 _encode_type_and_value
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/MWS/Client.pm view on Meta::CPAN
The call to the API method was missing a required argument. The name of the
missing argument can be found in $e->name.
=head2 Amazon::MWS::Exception::Transport
There was an error communicating with the Amazon endpoint. The HTTP::Request
and Response objects can be found in $e->request and $e->response.
=head2 Amazon::MWS::Exception::Response
Amazon returned an response, but indicated an error. An arrayref of hashrefs
view all matches for this distribution
view release on metacpan or search on metacpan
example/jp_iteminfo.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Amazon::PAApi5::Payload;
use Amazon::PAApi5::Signature;
use HTTP::Request::Common;
use LWP::UserAgent;
use Data::Dumper;
my $PARTNER_TAG = $ENV{AMAZON_PARTNER_TAG};
my $ACCESS_KEY = $ENV{AMAZON_ACCESS_KEY};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/S3/Thin.pm view on Meta::CPAN
{
croak "$policy_name is not a supported canned access policy";
}
}
# make the HTTP::Request object
sub _compose_request {
my ($self, $method, $resource, $headers, $content, $metadata) = @_;
croak 'must specify method' unless $method;
croak 'must specify resource' unless defined $resource;
if (ref $resource ne 'Amazon::S3::Thin::Resource') {
lib/Amazon/S3/Thin.pm view on Meta::CPAN
}
} else {
$url = $resource->to_url_without_region($protocol, $MAIN_HOST);
}
my $request = HTTP::Request->new($method, $url, $http_headers, $content);
# sign the request using the signer, unless already signed
if (!$request->header('Authorization')) {
$self->{signer}->sign($request);
}
return $request;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/S3.pm view on Meta::CPAN
if $region;
my $url
= 'http://169.254.169.254/latest/meta-data/placement/availability-zone';
my $request = HTTP::Request->new( 'GET', $url );
my $ua = LWP::UserAgent->new;
$ua->timeout(0);
my $response = eval { return $ua->request($request); };
lib/Amazon/S3.pm view on Meta::CPAN
return $FALSE if $bucketname !~ m{[[:lower:]\d]\z}xsm;
return $TRUE;
}
# make the HTTP::Request object
########################################################################
sub _make_request {
########################################################################
my ( $self, @args ) = @_;
lib/Amazon/S3.pm view on Meta::CPAN
}
}
$self->get_logger->debug( sprintf 'URL (uri): %s', $url );
my $request = HTTP::Request->new( $method, $url, $http_headers );
$self->last_request($request);
$request->content($data);
lib/Amazon/S3.pm view on Meta::CPAN
$self->get_logger->trace( sub { return Dumper( [$request] ); } );
return $request;
}
# $self->_send_request($HTTP::Request)
# $self->_send_request(@params_to_make_request)
########################################################################
sub _send_request {
########################################################################
my ( $self, @args ) = @_;
lib/Amazon/S3.pm view on Meta::CPAN
);
my $request;
my $keep_root = $FALSE;
if ( @args == 1 && ref( $args[0] ) =~ /HTTP::Request/xsm ) {
$request = $args[0];
}
else {
if ( ref $args[0] ) {
$keep_root = delete $args[0]->{keep_root};
lib/Amazon/S3.pm view on Meta::CPAN
sub adjust_region {
########################################################################
my ( $self, $bucket, $called_from_redirect ) = @_;
my $request
= HTTP::Request->new( 'GET', 'https://' . $bucket . $DOT . $self->host );
$self->{'signer'}->sign($request);
# We have to turn off our special retry since this will deliberately trigger that code
$self->turn_off_special_retry();
lib/Amazon/S3.pm view on Meta::CPAN
Returns the last L<HTTP::Response> object.
=head2 last_request
Returns the last L<HTTP::Request> object.
=head2 level
Set the logging level.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/SES.pm view on Meta::CPAN
use HTTP::Headers;
use LWP::UserAgent;
use AWS::Signature4;
use Amazon::SES::Response;
use VM::EC2::Security::CredentialCache;
use HTTP::Request::Common;
use Kavorka qw( multi method );
has 'ua' => (is => 'ro', default => sub { return LWP::UserAgent->new() } );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/SNS/V4.pm view on Meta::CPAN
use LWP::UserAgent;
use XML::Simple;
use URI::Escape;
use AWS::Signature4;
use HTTP::Request::Common;
use Amazon::SNS::V4::Target;
use Amazon::SNS::V4::Topic;
use Amazon::SNS::V4::FifoTopic;
our $VERSION = '2.0';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/SQS/Client.pm view on Meta::CPAN
my $url = $queueUrl;
my $ua = $self->get_UserAgent;
my $request = HTTP::Request->new( POST => $url );
$request->content_type('application/x-www-form-urlencoded; charset=utf-8');
my $data = $EMPTY;
foreach my $parameterName ( keys %{$parameters} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/SQS/Simple/Base.pm view on Meta::CPAN
use LWP::UserAgent;
use MIME::Base64;
use URI::Escape;
use XML::Simple;
use HTTP::Date;
use HTTP::Request::Common;
use AWS::Signature4;
use POSIX qw(strftime);
use Encode qw(encode);
use Data::Dumper;
use Time::HiRes;
lib/Amazon/SQS/Simple/Base.pm view on Meta::CPAN
$params->{Timestamp} = _timestamp();
}
foreach my $try (1..MAX_RETRIES) {
my $req = HTTP::Request->new(POST => $url);
$req->header(host => URI->new($url)->host);
my $now = time;
my $http_date = strftime('%Y%m%dT%H%M%SZ', gmtime($now));
my $date = strftime('%Y%m%d', gmtime($now));
view all matches for this distribution