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/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
view release on metacpan or search on metacpan
lib/Cisco/ACI.pm view on Meta::CPAN
use strict;
use warnings;
use Carp;
use JSON;
use HTTP::Request;
use LWP;
use XML::Simple;
use Cisco::ACI::Rule;
use Cisco::ACI::FvcapRule;
use Cisco::ACI::FvAEPg;
lib/Cisco/ACI.pm view on Meta::CPAN
sub __request {
my ( $self, $uri, $data ) = @_;
my $r;
if ( $data ) {
$r = HTTP::Request->new( POST => $uri );
$r->content( $data );
}
else {
$r = HTTP::Request->new( GET => $uri );
}
my $s = $self->{ __ua }->request( $r );
$self->{ error } = "Login failure: $!" unless $s->is_success;
view all matches for this distribution
view release on metacpan or search on metacpan
my $xml = $myexecute->Content_Noheader;
# Translate non-alpha chars into hex
$xml = URI::Escape::uri_escape("$xml");
my $request = new HTTP::Request POST => "$POSTURL";
$request->authorization_basic($USER, $PASSWORD);
$request->content("XML=$xml"); # Phone requires parameter named XML
my $response = $ua->request($request); # Send the POST
if ($response->is_success) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cisco/UCS.pm view on Meta::CPAN
);
$self->{uri} = $self->{proto}. '://' .$self->{cluster}
. ':' .$self->{port}. '/nuova';
$self->{req} = HTTP::Request->new(
POST => $self->{uri}
);
$self->{req}->content_type( 'application/x-www-form-urlencoded' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CloudApp/REST.pm view on Meta::CPAN
use Moose;
use MooseX::Types::URI qw(Uri);
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use Module::Load;
use Data::Dumper;
=head1 NAME
lib/CloudApp/REST.pm view on Meta::CPAN
$self->useragent->requests_redirectable([]) if $params->{noredirect};
my $res;
unless (exists $body{file}) {
$self->_debug("New request, URI is $uri");
my $req = HTTP::Request->new;
$req->header(Accept => 'application/json');
$req->content_type('application/json');
$req->uri($uri);
$req->method('GET');
view all matches for this distribution
view release on metacpan or search on metacpan
examples/helloworld/app/lib/App/Test.pm view on Meta::CPAN
use Dwarf::Pragma;
use parent 'Exporter';
use Data::Dumper;
use JSON;
use HTTP::Cookies;
use HTTP::Request::Common qw/GET HEAD PUT POST DELETE/;
use Plack::Test;
use Test::More;
use WWW::Mechanize;
use App;
examples/helloworld/app/lib/App/Test.pm view on Meta::CPAN
my @a = ($uri->as_string);
push @a, @args if $method !~ /^(get|delete)$/i;
$method = uc $method;
# HTTP::Request::Common ã PATCH ããµãã¼ããã¦ãªãã®ã§ã¯ã¼ã¯ã¢ã©ã¦ã³ã
if ($method eq 'PATCH') {
$method = 'POST';
$method = \&$method;
$req = $method->(@a);
$req->method('PATCH');
view all matches for this distribution
view release on metacpan or search on metacpan
ex/httpd.pl view on Meta::CPAN
no Cogwheel;
}
{
package My::HTTP::Request;
use Moose;
has raw => (
isa => 'HTTP::Request',
is => 'rw',
handles => [qw(protocol uri header)],
);
has start_time => (
ex/httpd.pl view on Meta::CPAN
{
package My::HTTP::Server::Plugin;
use Cogwheel;
use HTTP::Request;
use HTTP::Response;
use HTTP::Status qw( status_message is_info RC_BAD_REQUEST );
use POE qw(Filter::HTTPD);
use Time::HiRes qw( time );
use HTTP::Date;
ex/httpd.pl view on Meta::CPAN
sub OK() { 1 }
sub DEFER() { 0 }
sub BAD() { undef }
has request => (
isa => 'My::HTTP::Request',
is => 'rw',
predicate => 'has_request',
clearer => 'clear_request',
lazy => 1,
default => sub { My::HTTP::Request->new() },
handles => [qw(content has_content content_length)],
);
has response => (
isa => 'HTTP::Response',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CohortExplorer/Application/Opal/Datasource.pm view on Meta::CPAN
# Authenticate using Opal url
# Default Opal url is http://localhost:8080
my $ua = LWP::UserAgent->new( timeout => 10, ssl_opts => { verify_hostname => 0 } );
(my $url = $self->url || 'http://localhost:8080' ) =~ s/\/$//;
my $req = HTTP::Request->new( GET => $url . "/ws/datasource/$ds_name" );
$req->header(
Authorization => "X-Opal-Auth "
. MIME::Base64::encode( join ':', @opts{qw/username password/} ),
Accept => "application/json"
);
lib/CohortExplorer/Application/Opal/Datasource.pm view on Meta::CPAN
# Get list of allowed variables from each table
my $ua = LWP::UserAgent->new( timeout => 10, ssl_opts => { verify_hostname => 0 } );
(my $url = $self->url || 'http://localhost:8080' ) =~ s/\/$//;
for my $t ( @{ $param{allowed_tables} } ) {
my $entity_req =
HTTP::Request->new(
GET => $url . "/ws/datasource/$ds_name/table/$t/entities" );
$entity_req->header(
Authorization => "X-Opal-Auth "
. MIME::Base64::encode( join ':', @opts{qw/username password/} ),
Accept => "application/json"
lib/CohortExplorer/Application/Opal/Datasource.pm view on Meta::CPAN
# Get the first identifier
if ( $entity_res->code == 200 ) {
my $decoded_json = decode_json( $entity_res->decoded_content );
my $var_req =
HTTP::Request->new( GET => $url
. "/ws/datasource/$ds_name/table/$t/valueSet/"
. ( $decoded_json->[0]->{identifier} || '' ) );
$var_req->header(
Authorization => "X-Opal-Auth "
. MIME::Base64::encode( join ':', @opts{qw/username password/} ),
view all matches for this distribution
view release on metacpan or search on metacpan
t/app/Plack/Request.t view on Meta::CPAN
Tokuhiro Matsuno
=head1 SEE ALSO
L<Plack::Response> L<HTTP::Request>, L<Catalyst::Request>
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Conclave/OTK/Backend/4store.pm view on Meta::CPAN
package Conclave::OTK::Backend::4store;
# ABSTRACT: OTK backend for 4store
use parent qw/Conclave::OTK::Backend/;
use LWP::UserAgent;
use HTTP::Request::Common qw/PUT DELETE/;
sub new {
my ($class, $base_uri, %opts) = @_;
my $self = bless({}, $class);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Conductrics/Client.pm view on Meta::CPAN
use URI::QueryParam;
use JSON::MaybeXS;
use JSON::Schema;
use Time::HiRes;
use LWP::UserAgent;
use HTTP::Request;
our $VERSION = '0.003';
$VERSION = eval $VERSION;
sub build_uri {
lib/Conductrics/Client.pm view on Meta::CPAN
$uri->query_param_append($k, $parameters{$k});
}
if ('HASH' eq ref $content) {
$content=JSON::MaybeXS::encode_json($content);
}
my $request = HTTP::Request->new("PUT", $uri, undef, $content);
$request->header(Content_Type => 'application/json');
#use Data::Dumper;
#print Dumper($request);
my $response = $ua->request($request);
if ($response->is_success) {
lib/Conductrics/Client.pm view on Meta::CPAN
my %parameters = (apikey=>$self->apiKey);
for my $k (keys %parameters) {
$uri->query_param_append($k, $parameters{$k});
}
my $request = HTTP::Request->new("DELETE", $uri);
my $response = $ua->request($request);
if ($response->is_success) {
return JSON::MaybeXS::decode_json($response->decoded_content);
} else {
warn "Content: ", $response->decoded_content; # or whatever
view all matches for this distribution
view release on metacpan or search on metacpan
name: Config-Universal
version: 0.5
version_from: lib/Config/Universal.pm
installdirs: site
requires:
HTTP::Request::Common:
HTTP::Response:
LWP::UserAgent:
XML::DOM:
distribution_type: module
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Connector/Proxy/HTTP.pm view on Meta::CPAN
my $args = shift;
my $url = $self->_sanitize_path( $args );
$self->log()->debug('Make LWP call to ' . $url );
my $req = HTTP::Request->new('GET' => $url);
$self->_init_request( $req );
my $response = $self->agent()->request($req);
if (!$response->is_success) {
lib/Connector/Proxy/HTTP.pm view on Meta::CPAN
}
$content = $data;
}
# create request
my $req = HTTP::Request->new($self->http_method() => $url);
$self->_init_request( $req );
# set generated content
$req->content($content);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Consul/Simple.pm view on Meta::CPAN
package Consul::Simple;
$Consul::Simple::VERSION = '1.142430';
use strict;use warnings;
use LWP::UserAgent;
use HTTP::Response;
use HTTP::Request::Common;
use MIME::Base64;
use JSON;
use Data::Dumper;
sub new {
lib/Consul/Simple.pm view on Meta::CPAN
%args = @args;
}
my $url = $self->_mk_kv_url($key);
$url .= '?recurse' if $args{recurse};
my $res = $self->_do_request(
HTTP::Request::Common::_simple_req(
'DELETE',
$url
)
);
return $res;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Continuity/Adapt/FCGI.pm view on Meta::CPAN
Continuity::Adapt::FCGI - Use HTTP::Daemon as a continuation server
=head1 DESCRIPTION
This module provides the glue between FastCGI Web and Continuity, translating FastCGI requests into HTTP::RequestWrapper
objects that are sent to applications running inside Continuity.
=head1 METHODS
=over
lib/Continuity/Adapt/FCGI.pm view on Meta::CPAN
package Continuity::Adapt::FCGI::Request;
use strict;
use CGI::Util qw(unescape);
use HTTP::Headers;
use base 'HTTP::Request';
use Continuity::Request;
use base 'Continuity::Request';
# CGI query params
sub cached_params { exists $_[1] ? $_[0]->{cached_params} = $_[1] : $_[0]->{cached_params} }
lib/Continuity/Adapt/FCGI.pm view on Meta::CPAN
sub debug_callback :lvalue { $_[0]->{debug_callback} }
=item $request = Continuity::Adapt::FCGI::Request->new($client, $id, $cgi, $query)
Creates a new C<Continuity::Adapt::FCGI::Request> object. This deletes values
from C<$cgi> while converting it into a L<HTTP::Request> object.
It also assumes $cgi contains certain CGI variables.
This code was borrowed from POE::Component::FastCGI
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cookie/Jar.pm view on Meta::CPAN
return( $self->error( "Response object provided is not an object." ) ) if( !Scalar::Util::blessed( $resp ) );
my $uri;
if( $self->_is_a( $resp, 'HTTP::Response' ) )
{
my $req = $resp->request;
return( $self->error( "No HTTP::Request object is set in this HTTP::Response." ) ) if( !$resp->request );
$uri = $resp->request->uri;
}
elsif( $resp->can( 'uri' ) && $resp->can( 'header' ) )
{
$uri = $resp->uri;
lib/Cookie/Jar.pm view on Meta::CPAN
my $jar = Cookie::Jar->new( request => $r ) ||
die( "An error occurred while trying to get the cookie jar:", Cookie::Jar->error );
# set the default host
$jar->host( 'www.example.com' );
$jar->fetch;
# or using a HTTP::Request object
# Retrieve cookies from Cookie header sent from client
$jar->fetch( request => $http_request );
if( $jar->exists( 'my-cookie' ) )
{
# do something
lib/Cookie/Jar.pm view on Meta::CPAN
For example, Apache2::Cookie does not work well in decoding cookies, and L<Cookie::Baker> C<Set-Cookie> timestamp format is wrong. They use Mon-09-Jan 2020 12:17:30 GMT where it should be, as per rfc 6265 Mon, 09 Jan 2020 12:17:30 GMT
Also L<APR::Request::Cookie> and L<Apache2::Cookie> which is a wrapper around L<APR::Request::Cookie> return a cookie object that returns the value of the cookie upon stringification instead of the full C<Set-Cookie> parameters. Clearly they designed...
This module supports modperl and uses a L<Apache2::RequestRec> if provided, or can use package objects that implement similar interface as L<HTTP::Request> and L<HTTP::Response>, or if none of those above are available or provided, this module return...
This module is also compatible with L<LWP::UserAgent>, so you can use like this:
use LWP::UserAgent;
use Cookie::Jar;
lib/Cookie/Jar.pm view on Meta::CPAN
This is an alias for L</add_request_header> for backward compatibility with L<HTTP::Cookies>
=head2 add_request_header
Provided with a request object, such as, but not limited to L<HTTP::Request> and this will add all relevant cookies in the repository into the C<Cookie> C<HTTP> request header. The object method needs to have the C<header> method in order to get, or ...
As long as the object provided supports the C<uri> and C<header> method, you can provide any class of object you want.
Please refer to the L<rfc6265|https://datatracker.ietf.org/doc/html/rfc6265> for more information on the applicable rule when adding cookies to the outgoing request header.
lib/Cookie/Jar.pm view on Meta::CPAN
It retrieves all possible cookies from the HTTP request received from the web browser.
It takes an optional hash or hash reference of parameters, such as C<host>. If it is not provided, the value set with L</host> is used instead.
If the parameter C<request> containing an HTTP request object, such as, but not limited to L<HTTP::Request>, is provided, it will use it to get the C<Cookie> header value. The object method needs to have the C<header> method in order to get, or set t...
Alternatively, if a value for L</request> has been set, it will use it to get the C<Cookie> header value from Apache modperl.
You can also provide the C<Cookie> string to parse by providing the C<string> option to this method.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Coro/Amazon/SimpleDB.pm view on Meta::CPAN
REPLACE_AMAZON_SIMPLEDB_CLIENT_HTTPPOST: {
package Amazon::SimpleDB::Client;
use common::sense;
use AnyEvent::HTTP;
use HTTP::Request;
use HTTP::Response;
# The only mention of a time-out in Amazon::SimpleDB::Client is in
# reference to a select operation. I'm using the value from there
# (5 seconds) as the default time-out for HTTP requests, as it
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CouchDB/Client.pm view on Meta::CPAN
our $VERSION = '0.09';
use JSON::Any qw(XS JSON DWIW);
use LWP::UserAgent qw();
use HTTP::Request qw();
use Encode qw(encode);
use Carp qw(confess);
use CouchDB::Client::DB;
lib/CouchDB/Client.pm view on Meta::CPAN
if (ref $content) {
$content = encode('utf-8', $self->{json}->encode($content));
$headers = HTTP::Headers->new('Content-Type' => 'application/json');
}
my $res = $self->{ua}->request( HTTP::Request->new($meth, $self->uriForPath($path), $headers, $content) );
my $ret = {
status => $res->code,
msg => $res->status_line,
success => 0,
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crop/HTTP/Request.pm view on Meta::CPAN
package Crop::HTTP::Request;
use base qw/ Crop::Object::Simple /;
=begin nd
Class: Crop::HTTP::Request
HTTP request.
Base class for particular gateways such FastCGI, PSGI, CGI.
Attributes contain start and finish time besides regular HTTP data.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crop/HTTP/Request.pm view on Meta::CPAN
package Crop::HTTP::Request;
use base qw/ Crop::Object::Simple /;
=begin nd
Class: Crop::HTTP::Request
HTTP request.
Base class for particular gateways such FastCGI, PSGI, CGI.
Attributes contain start and finish time besides regular HTTP data.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CrowdSec/Client.pm view on Meta::CPAN
package CrowdSec::Client;
use strict;
use Date::Parse;
use HTTP::Request::Common;
use JSON;
use LWP::UserAgent;
use Moo;
use POSIX "strftime";
view all matches for this distribution
view release on metacpan or search on metacpan
script/ct-submit.pl view on Meta::CPAN
while (my ($log_name, $log_url) = each %logs) {
write_log("\nSending request to $log_url");
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new('POST', $log_url . '/ct/v1/add-chain', ['Content-Type' => 'application/json'], $json_data);
my $res = $ua->request($req);
if (!$res->is_success) {
write_log('Failed: ', $res->status_line, "\n");
next;
view all matches for this distribution