view release on metacpan or search on metacpan
benchmark/rest.pl view on Meta::CPAN
use strict;
use warnings;
BEGIN { $ENV{CATALYST_DEBUG} = 0; $ENV{DBIC_TRACE} = 0;};
use HTTP::Request::Common;
use JSON;
use lib qw(t/lib);
use Test::WWW::Mechanize::Catalyst 'MyApp';
view all matches for this distribution
view release on metacpan or search on metacpan
Catalyst::Plugin::Session::State::Cookie: 0
Catalyst::Plugin::Session::Store::FastMmap: 0
Catalyst::Test: 0
ExtUtils::MakeMaker: 6.42
FindBin: 0
HTTP::Request: 0
Test::More: 0.62
Test::WWW::Mechanize::Catalyst: 0
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
view all matches for this distribution
view release on metacpan or search on metacpan
t/live-test.t view on Meta::CPAN
# setup library path
use FindBin qw($Bin);
use lib "$Bin/lib";
use HTTP::Headers;
use HTTP::Request::Common;
use LWP::Simple qw(!get);
use JSON::Any;
# make sure testapp works
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Authentication/Credential/OAuth2.pm view on Meta::CPAN
package Catalyst::Authentication::Credential::OAuth2;
use Moose;
use MooseX::Types::Common::String qw(NonEmptySimpleStr);
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON::Any;
use Moose::Util;
# ABSTRACT: Authenticate against OAuth2 servers
view all matches for this distribution
view release on metacpan or search on metacpan
abstract: 'Map body and data parameters to a model'
author:
- 'John Napiorkowski <jjnapiork@cpan.org>'
build_requires:
Catalyst::Test: '0'
HTTP::Request::Common: '0'
Test::Lib: '0.003'
Test::Most: '0.34'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_crud.t view on Meta::CPAN
#!/usr/bin/env perl
use FindBin qw/$Bin/;
use lib "$Bin/lib";
use CatalystX::Resource::TestKit;
use Test::Exception;
use HTTP::Request::Common;
use Catalyst::Test qw/TestApp/;
my ($res, $c) = ctx_request('/');
my $schema = $c->model('DB')->schema;
view all matches for this distribution
view release on metacpan or search on metacpan
use Test::More 0.88;
use lib 't/lib';
use Catalyst::Test 'MyApp1';
use HTTP::Request::Common qw( GET PUT POST DELETE );
{
request( GET '/foo', ( Accept => 'application/json' ) );
is(
view all matches for this distribution
view release on metacpan or search on metacpan
Catalyst::Plugin::Session::State::Cookie: 0
CatalystX::InjectComponent: 0
Class::Load: '0.20'
ExtUtils::MakeMaker: 6.36
File::Temp: 0
HTTP::Request::Common: 0
SQL::Translator: 0
Test::Exception: 0
Test::More: '0.94'
configure_requires:
ExtUtils::MakeMaker: 6.36
view all matches for this distribution
view release on metacpan or search on metacpan
},
"test" : {
"requires" : {
"Catalyst::Runtime" : "5.80",
"FindBin" : 0,
"HTTP::Request::Common" : 0,
"Moose" : "2.0007",
"Test::More" : "0.98",
"namespace::autoclean" : "0.12",
"syntax" : "0.003"
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Test/MockContext.pm view on Meta::CPAN
version 0.000004
=head1 SYNOPSIS
use HTTP::Request::Common;
use CatalystX::Test::MockContext;
my $m = mock_context('MyApp');
my $c = $m->(GET '/');
lib/CatalystX/Test/MockContext.pm view on Meta::CPAN
=head2 mock_context
my $sub = mock_context('MyApp');
This function returns a closure that takes an L<HTTP::Request> object and returns a
L<Catalyst> context object for that request.
=head1 SOURCE
The development version is on github at L<https://github.com/robrwo/CatalystX-Test-MockContext>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Test/Most.pm view on Meta::CPAN
package CatalystX::Test::Most;
use strictures;
no warnings "uninitialized";
use HTTP::Request::Common ( qw{ GET POST DELETE PUT } );
use Test::More;
use Test::Fatal;
our $AUTHORITY = "cpan:ASHLEY";
our $VERSION = "0.05";
our @EXPORT = ( qw{ GET POST DELETE PUT },
lib/CatalystX/Test/Most.pm view on Meta::CPAN
*{"${calling_package}::$_"} = \&{$_} for @EXPORT;
}
}
# delete is obviously a problem and the rest should maybe be the uc
# anyway and not export the HTTP::Request::Common ones or something new?
#sub get { request( GET( @_ ) ); }
#sub put { request( PUT( @_ ) ); }
#sub post { request( POST( @_ ) ); }
#sub delete { request( DELETE( @_ ) ); }
lib/CatalystX/Test/Most.pm view on Meta::CPAN
=pod
=head1 Name
CatalystX::Test::Most - Test base pulling in L<Catalyst::Test>, L<Test::More>, L<Test::Fatal>, and L<HTTP::Request::Common> for unit tests on Catalyst applications.
=head1 Synopsis
use CatalystX::Test::Most "MyApp";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Test/Recorder.pm view on Meta::CPAN
use Test::More;
use strict;
use warnings;
use URI;
use HTTP::Request::Common qw(GET HEAD PUT DELETE POST);
use Test::WWW::Mechanize::Catalyst 'MyApp';
my $mech = Test::WWW::Mechanize::Catalyst->new();
$mech->requests_redirectable([]); # disallow redirects
view all matches for this distribution
view release on metacpan or search on metacpan
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
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/Catmandu/CA/API/Login.pm view on Meta::CPAN
use Catmandu::Sane;
use Data::Dumper qw(Dumper);
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;
has username => (is => 'ro', required => 1);
has password => (is => 'ro', required => 1);
has url => (is => 'ro', required => 1);
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
requirements:
Carp 0
ExtUtils::MakeMaker 0
HTTP::Date 6
HTTP::Headers::Util 6
HTTP::Request 0
Time::Local 0
locale 0
perl 5.008001
strict 0
vars 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.13
HTTP::Headers::Auth 6.13
HTTP::Headers::ETag 6.13
HTTP::Headers::Util 6.13
HTTP::Message 6.13
HTTP::Request 6.13
HTTP::Request::Common 6.13
HTTP::Response 6.13
HTTP::Status 6.13
requirements:
Carp 0
Compress::Raw::Zlib 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/Catmandu/FedoraCommons.pm view on Meta::CPAN
use Catmandu::FedoraCommons::Response;
our $VERSION = '0.274';
use URI::Escape;
use HTTP::Request::Common qw(GET POST DELETE PUT HEAD);
use LWP::UserAgent;
use MIME::Base64;
use strict;
use Carp;
use Data::Validate::URI qw(is_uri);
view all matches for this distribution
view release on metacpan or search on metacpan
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.11
HTTP::Headers::Auth 6.11
HTTP::Headers::ETag 6.11
HTTP::Headers::Util 6.11
HTTP::Message 6.11
HTTP::Request 6.11
HTTP::Request::Common 6.11
HTTP::Response 6.11
HTTP::Status 6.11
requirements:
Compress::Raw::Zlib 0
Encode 2.21
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
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.11
HTTP::Headers::Auth 6.11
HTTP::Headers::ETag 6.11
HTTP::Headers::Util 6.11
HTTP::Message 6.11
HTTP::Request 6.11
HTTP::Request::Common 6.11
HTTP::Response 6.11
HTTP::Status 6.11
requirements:
Compress::Raw::Zlib 0
Encode 2.21
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
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.11
HTTP::Headers::Auth 6.11
HTTP::Headers::ETag 6.11
HTTP::Headers::Util 6.11
HTTP::Message 6.11
HTTP::Request 6.11
HTTP::Request::Common 6.11
HTTP::Response 6.11
HTTP::Status 6.11
requirements:
Compress::Raw::Zlib 0
Encode 2.21
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
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.11
HTTP::Headers::Auth 6.11
HTTP::Headers::ETag 6.11
HTTP::Headers::Util 6.11
HTTP::Message 6.11
HTTP::Request 6.11
HTTP::Request::Common 6.11
HTTP::Response 6.11
HTTP::Status 6.11
requirements:
Compress::Raw::Zlib 0
Encode 2.21
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/Catmandu/MediaHaven.pm view on Meta::CPAN
Create a new connection to the MediaHaven server.
=cut
use Moo;
use HTTP::Request::Common;
use LWP::Simple;
use URI::Escape;
use JSON;
use LWP;
use Carp;
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
Catmandu::Store::FedoraCommons::FOXML undef
requirements:
Catmandu 0.9301
Data::Validate::Type v1.5.1
Data::Validate::URI 0.06
HTTP::Request::Common 6.04
IO::Socket::SSL 2.015
Module::Build::Tiny 0.039
RDF::Trine 1.014
Test::JSON 0.11
XML::LibXML 2.0121
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.11
HTTP::Headers::Auth 6.11
HTTP::Headers::ETag 6.11
HTTP::Headers::Util 6.11
HTTP::Message 6.11
HTTP::Request 6.11
HTTP::Request::Common 6.11
HTTP::Response 6.11
HTTP::Status 6.11
requirements:
Compress::Raw::Zlib 0
Encode 2.21
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
"perl" : "5.010"
}
},
"test" : {
"requires" : {
"HTTP::Request::Common" : "0",
"Moo" : "0",
"Plack::Test" : "0",
"Test::More" : "0.96"
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer.pm view on Meta::CPAN
our $VERSION = '1.2025';
use Catmandu::Util qw(io is_value is_string is_array_ref is_hash_ref);
use Catmandu::Util::Path qw(as_path);
use LWP::UserAgent;
use HTTP::Request ();
use URI ();
use URI::Template ();
use Moo::Role;
use namespace::clean;
lib/Catmandu/Importer.pm view on Meta::CPAN
sub _http_request {
my ($self, $method, $url, $headers, $body, $timing_tries) = @_;
my $client = $self->_http_client;
my $req = HTTP::Request->new($method, $url, $headers || []);
$req->content($body) if defined $body;
my $res = $client->request($req);
if ($res->code =~ /^408|500|502|503|504$/ && $timing_tries) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
use Digest::MD5 ();
# this is almost a direct copy of
# https://metacpan.org/pod/Net::Amazon::S3::HTTPRequest
# ABSTRACT: Create a signed HTTP::Request
my $METADATA_PREFIX = 'x-amz-meta-';
my $AMAZON_HEADER_PREFIX = 'x-amz-';
enum 'HTTPMethod' => [ qw(DELETE GET HEAD PUT POST) ];
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
has 'metadata' =>
( is => 'ro', isa => 'HashRef', required => 0, default => sub { {} } );
__PACKAGE__->meta->make_immutable;
# make the HTTP::Request object
sub http_request {
my $self = shift;
my $method = $self->method;
my $path = $self->path;
my $headers = $self->headers;
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
unless exists $headers->{Authorization};
my $request
= HTTP::Request->new( $method, $uri, $http_headers, $content );
#my $req_as = $request->as_string;
#$req_as =~ s/[^\n\r\x20-\x7f]/?/g;
#$req_as = substr( $req_as, 0, 1024 ) . "\n\n";
#warn $req_as;
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
=pod
=head1 NAME
Ceph::RadosGW::Admin::HTTPRequest::HTTPRequest - Create a signed HTTP::Request
=head1 VERSION
version 0.60
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
content => $content,
)->http_request;
=head1 DESCRIPTION
This module creates an HTTP::Request object that is signed
appropriately for Amazon S3.
=for test_synopsis no strict 'vars'
=head1 METHODS
=head2 http_request
This method creates, signs and returns a HTTP::Request object.
=head2 query_string_authentication_uri
This method creates, signs and returns a query string authentication
URI.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chart/Plotly/Image/Orca/Client.pm view on Meta::CPAN
my $file = path( $params{file} );
my $ua = LWP::UserAgent->new;
$ua->agent("Chart::Plotly::Image::Orca::Client/0.1");
my $req = HTTP::Request->new( POST => $params{server} );
$req->content_type('application/json');
$req->content( $plot->to_json_text );
my $res = $ua->request($req);
if ( $res->is_success ) {
path($file)->spew_raw( $res->content );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chat/iFly.pm view on Meta::CPAN
use strict;
use warnings;
package Chat::iFly;
use HTTP::Thin;
use HTTP::Request::Common;
use JSON;
use URI;
use Ouch;
use Moo;
lib/Chat/iFly.pm view on Meta::CPAN
=head1 PREREQS
L<HTTP::Thin>
L<Ouch>
L<HTTP::Request::Common>
L<JSON>
L<URI>
L<Moo>
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
ExtUtils::MakeMaker 6.30
File::Basename 0
File::HomeDir 0
File::Spec 0
Getopt::Long::Descriptive 0.084
HTTP::Request::Common 0
HTTP::Status 0
LWP::Protocol::https 1
LWP::UserAgent 0
Term::ReadKey 0
strict 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
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
# non-absolute redirect from &_trivial_http_get
my($host, $port, $path) = @_;
require URI;
$url = URI->new_abs($url, "http://$host:$port$path");
}
my $request = HTTP::Request->new
(GET => $url,
);
my $response = $ua->request($request);
return $response->is_success ? $response->content : undef;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Circle/Common.pm view on Meta::CPAN
use strict;
use warnings;
use Exporter 'import';
use URL::Encode qw(url_encode_utf8);
use LWP::UserAgent;
use HTTP::Request;
use Slurp;
use Try::Tiny;
use YAML;
use JSON;
use Carp;
lib/Circle/Common.pm view on Meta::CPAN
];
}
else {
$header = [ 'Content-Type' => 'application/json; charset=UTF-8' ];
}
my $request = HTTP::Request->new( 'POST', $url, $header, encode_json($data) );
my $response = $ua->request($request);
if ( $response->is_success ) {
return decode_json( $response->decoded_content );
}
else {
lib/Circle/Common.pm view on Meta::CPAN
];
}
else {
$header = [ 'Content-Type' => 'application/json; charset=UTF-8' ];
}
my $request = HTTP::Request->new( 'GET', $url, $header );
my $response = $ua->request($request);
if ( $response->is_success ) {
return decode_json( $response->decoded_content );
}
else {
view all matches for this distribution