Result:
found more than 590 distributions - search limited to the first 2001 files matching your query ( run in 1.866 )


Business-Fixflo

 view release on metacpan or  search on metacpan

lib/Business/Fixflo/Client.pm  view on Meta::CPAN

}

sub _build_request {
    my ( $self,$method,$path ) = @_;

    my $req = HTTP::Request->new(
        # passing through the absolute URL means we don't build it
        $method => $path =~ /^http/
            ? $path : join( '/',$self->base_url . $self->api_path,$path ),
    );

 view all matches for this distribution


Business-GoCardless

 view release on metacpan or  search on metacpan

lib/Business/GoCardless/Client.pm  view on Meta::CPAN

    $credentials    =~ s/\s//g;

    my $ua = LWP::UserAgent->new;
    $ua->agent( $self->user_agent );

    my $req = HTTP::Request->new(
        POST => join( '/',$self->base_url . $self->api_path,'confirm' )
    );

    $req->header( 'Authorization' => "Basic $credentials" );
    $req->header( 'Accept' => 'application/json' );

lib/Business/GoCardless/Client.pm  view on Meta::CPAN

    my ( $self,$method,$path,$params ) = @_;

    my $ua = LWP::UserAgent->new;
    $ua->agent( $self->user_agent );

    my $req = HTTP::Request->new(
        # passing through the absolute URL means we don't build it
        $method => my $uri = $path =~ /^http/
            ? $path : join( '/',$self->base_url . $self->api_path . $path ),
    );

 view all matches for this distribution


Business-MaxMind

 view release on metacpan or  search on metacpan

lib/Business/MaxMind/HTTPBase.pm  view on Meta::CPAN

    );
    $query_string .= "&clientAPI=$API_VERSION";
    if ( $self->{"timeout"} > 0 ) {
        $self->{ua}->timeout( $self->{"timeout"} );
    }
    my $request = HTTP::Request->new( 'POST', $url );
    $request->content_type('application/x-www-form-urlencoded');
    $request->content($query_string);
    if ( $self->{debug} ) {
        print STDERR "sending HTTP::Request: " . $request->as_string;
    }
    my $response = $self->{ua}->request($request);
    if ( $response->is_success ) {
        my $content = $response->content;
        my @kvpair = split( ';', $content );

 view all matches for this distribution


Business-MollieAPI

 view release on metacpan or  search on metacpan

lib/Business/MollieAPI/Resource.pm  view on Meta::CPAN

package Business::MollieAPI::Resource;
use Moo::Role;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;

has client => (
    is => 'ro',
);

 view all matches for this distribution


Business-NoChex

 view release on metacpan or  search on metacpan

NoChex.pm  view on Meta::CPAN


sub verify{
  my($self)=shift;

  my($ua) = new LWP::UserAgent; 
  my($req) = new HTTP::Request 'POST',$REFERAL_URL; 
  $req->content_type('application/x-www-form-urlencoded');
  $req->content($self->cgi->query_string);  
  my($res) = $ua->request($req);

  if ($res->content eq 'AUTHORISED'){ $self->set_authorised; return 1 }

 view all matches for this distribution


Business-OnlinePayment-BitPay-Client

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/BitPay/Client.pm  view on Meta::CPAN


use Carp;
use warnings;
use Mozilla::CA;
use LWP::UserAgent;
use HTTP::Request;
use LWP::Protocol::https;
use Business::OnlinePayment::BitPay::KeyUtils;
use JSON;
use JSON::Parse 'parse_json';
require IO::Socket::SSL;

lib/Business/OnlinePayment/BitPay/Client.pm  view on Meta::CPAN

    my %opts = @_;
    my $path = $opts{"path"};
    my $public = $opts{"public"};
    my $uri = $self->{apiUri} or croak "no api_uri exists for object";
    $uri = $uri . "/" . $path;
    my $request = HTTP::Request->new(GET => $uri);
    $request->content($jsonc);
    $request->header('content-type' => 'application/json');
    $request->header('X-BitPay-Plugin-Info' => 'PerlLib');
    $request->header('User-Agent' => 'perl-bitpay-client');
    unless($public){

lib/Business/OnlinePayment/BitPay/Client.pm  view on Meta::CPAN

    my %opts = @_;
    my $path = $opts{"path"};
    my %content = %{%opts->{"params"}};
    my $uri = $self->{apiUri} or croak "no api_uri exists for object";
    $uri = $uri . "/" . $path;
    my $request = HTTP::Request->new(POST => $uri);
    my $ua = LWP::UserAgent->new;
    $ua->ssl_opts( verify_hostname=> 0, SSL_ca_file => Mozilla::CA::SSL_ca_file(), SSL_Version => 'TLSv2', SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE);
    my $jsonc = encode_json \%content;
    $request->content($jsonc);
    $request->header('content-type' => 'application/json');

 view all matches for this distribution


Business-OnlinePayment-BitPay-KeyUtils

 view release on metacpan or  search on metacpan

test.pl  view on Meta::CPAN

use strict;
use warnings;
use Mozilla::CA;
use Test::More;
use LWP::UserAgent;
use HTTP::Request;
use LWP::Protocol::https;
use JSON;
use JSON::Parse 'parse_json';
use IO::Socket::SSL;

test.pl  view on Meta::CPAN


sub test_can_connect_to_bitpay_api {
  my $uri = "https://bitpay.com/tokens";
  my $pem = Business::OnlinePayment::BitPay::KeyUtils::bpGeneratePem();
  my $sin = Business::OnlinePayment::BitPay::KeyUtils::bpGenerateSinFromPem($pem);
  my $request = HTTP::Request->new(POST => $uri);
  $request->header('content-type' => 'application/json');
  my %content = ('id'=>$sin);
  my $jsonc = encode_json \%content;
  $request->content($jsonc);
  my $ua = LWP::UserAgent->new;

 view all matches for this distribution


Business-OnlinePayment-Iridium

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/Iridium/Action.pm  view on Meta::CPAN

package Business::OnlinePayment::Iridium::Action;

use Moose::Role;
use Template;
use LWP::UserAgent ();
use HTTP::Request  ();
use XML::Simple    ();

# PODNAME: Business::OnlinePayment::Iridium::Action
# ABSTRACT: Send / receive data to / from PayVector

lib/Business/OnlinePayment/Iridium/Action.pm  view on Meta::CPAN

    my $content    = $self->_build_req_content;
    my $action_url = 'https://www.thepaymentgateway.net/';
    my $ua         = $self->_user_agent;
    my @SERVERS    = $self->SERVERS;

    my $req = HTTP::Request->new( POST => $SERVERS[0] );
    $req->content_type('text/xml; charset=UTF-8');
    $req->header( 'SOAPAction' => $action_url . $self->_type );
    $req->content($content);
    $req->content_length( length($content) );
    my $res = $ua->request($req);

 view all matches for this distribution


Business-OnlinePayment-Vanco

 view release on metacpan or  search on metacpan

Vanco.pm  view on Meta::CPAN

use Carp;
use Tie::IxHash;
use XML::Simple;
use XML::Writer;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common qw (POST);
use Date::Calc qw(Add_Delta_YM Add_Delta_Days);
use Business::OnlinePayment;
#use Business::OnlinePayment::HTTPS;
use vars qw($VERSION $DEBUG @ISA $me);

 view all matches for this distribution


Business-PayPal-NVP

 view release on metacpan or  search on metacpan

lib/Business/PayPal/NVP.pm  view on Meta::CPAN

    my %args = @_;

    my $lwp = $UserAgent;
    $lwp->timeout($Timeout) if $Timeout;
    $lwp->agent("perl-Business-PayPal-NVP/$VERSION");
    my $req = HTTP::Request->new( POST => $self->AUTH_CRED('url') );
    $req->content_type( 'application/x-www-form-urlencoded' );

    my $content = _build_content( USER      => $self->AUTH_CRED('user'),
				  PWD       => $self->AUTH_CRED('pwd'),
				  SIGNATURE => $self->AUTH_CRED('sig'),

 view all matches for this distribution


Business-PhoneBill-Allopass

 view release on metacpan or  search on metacpan

Allopass.pm  view on Meta::CPAN

See I<http://www.allopass.com/index.php4?ADV=1508058> for more informations on their system and how it basically works.

=cut

use strict;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use CGI::Cookie;

my $baseurl = 'http://www.allopass.com/check/vf.php4';

 view all matches for this distribution


Business-PinPayment

 view release on metacpan or  search on metacpan

lib/Business/PinPayment.pm  view on Meta::CPAN

package Business::PinPayment;
use strict;
use warnings;
use Net::SSL;
use HTTP::Request;
use LWP::UserAgent;
use JSON;

our $VERSION = '0.04';

lib/Business/PinPayment.pm  view on Meta::CPAN

  else {
    $url .= '/' . $api;
  }

  my $ua = LWP::UserAgent->new();
  my $p = HTTP::Request->new(POST => $url);
  $p->content_type('application/json');
  $p->authorization_basic($api_key);

  my $json_request = to_json( $self->{config}, {utf8 => 1} );
  $p->content($json_request) unless $api eq 'refunds';

lib/Business/PinPayment.pm  view on Meta::CPAN


Returns the error message.

=head2 C<response>

Returns the response of the L<HTTP::Request> object.

=head2 C<json_response>

Returns a hashref of the JSON response content.

lib/Business/PinPayment.pm  view on Meta::CPAN


Returns the 'card_token'.

=head1 SEE ALSO

L<HTTP::Request>, L<LWP::UserAgent>, L<https://pin.net.au>

=head1 AUTHOR

Xufeng (Danny) Liang (danny.glue@gmail.com)

 view all matches for this distribution


Business-Shipping-DataTools

 view release on metacpan or  search on metacpan

lib/Business/Shipping/DataTools.pm  view on Meta::CPAN

    return unless $url and $file;
    
    eval {
        use LWP::UserAgent;
        my $ua = LWP::UserAgent->new;
        my $req = HTTP::Request->new(GET => $url);
        open( NEW_ZONE_FILE, "> $file" );
        print( NEW_ZONE_FILE $ua->request($req)->content() );        
        close( NEW_ZONE_FILE );
    };
    warn $@ if $@;

 view all matches for this distribution


Business-Shipping

 view release on metacpan or  search on metacpan

lib/Business/Shipping/RateRequest/Online.pm  view on Meta::CPAN


    my $request_xml = $self->_gen_request_xml();

    #trace( $request_xml );
    info("gen_url = " . $self->_gen_url());
    my $request = HTTP::Request->new('POST', $self->_gen_url());
    $request->header('content-type'   => 'application/x-www-form-urlencoded');
    $request->header('content-length' => length($request_xml));
    $request->content($request_xml);

    return ($request);

 view all matches for this distribution


Business-SiteCatalyst

 view release on metacpan or  search on metacpan

lib/Business/SiteCatalyst.pm  view on Meta::CPAN

use warnings;

use Data::Dumper;
use Carp;
use LWP::UserAgent qw();
use HTTP::Request qw();
use JSON qw();
use Digest::MD5 qw();
use POSIX qw();
use Digest::SHA1 qw();
use MIME::Base64 qw();

lib/Business/SiteCatalyst.pm  view on Meta::CPAN

	my $password_digest = MIME::Base64::encode_base64(
		Digest::SHA1::sha1_hex( $nonce . $created . $self->{'shared_secret'} ) 
	);
	chomp($password_digest);
	
	my $request = HTTP::Request->new(POST => $url);
	carp "POSTing request to URL >" . ( defined( $url ) ? $url : '' ) . "<"
		if $verbose;
	my $auth_header = qq|UsernameToken Username="$username", PasswordDigest="$password_digest", Nonce="$nonce", Created="$created"|;
	carp "Auth header: >$auth_header<" if $verbose;
	

 view all matches for this distribution


Business-Stripe

 view release on metacpan or  search on metacpan

Stripe.pm  view on Meta::CPAN

use strict;
use warnings;

use JSON;
use LWP::UserAgent;
use HTTP::Request::Common qw/DELETE GET POST/;
use MIME::Base64 qw(encode_base64);

our $VERSION         = '0.07';

use constant URL     => 'https://api.stripe.com/v1/';

Stripe.pm  view on Meta::CPAN

        },
    );

=item C<-ua> Completely overrides the default user agent object (L<LWP::UserAgent>).
Note that your object I<must> accept HTTPS, and provide a C<request()> method
accepting L<HTTP::Request> objects and returning L<HTTP::Response>-compatible
objects. You can use this to have a common user agent make all requests in
your code. The example above works exactly like:

    my $ua = LWP::UserAgent->new(
        timeout   => 10,

 view all matches for this distribution


Business-TNT-ExpressConnect

 view release on metacpan or  search on metacpan

lib/Business/TNT/ExpressConnect.pm  view on Meta::CPAN


sub get_prices {
    my ($self, $args) = @_;

    my $user_agent = $self->user_agent;
    my $req = HTTP::Request->new(POST => $self->tnt_get_price_url);
    $req->authorization_basic($self->username, $self->password);
    $req->header('Content-Type' => 'text/xml; charset=utf-8');

    if (my $file = $args->{file}) {
        $req->content('' . file($file)->slurp);

 view all matches for this distribution


Business-Tax-Avalara

 view release on metacpan or  search on metacpan

lib/Business/Tax/Avalara.pm  view on Meta::CPAN

use warnings;

use Try::Tiny;
use Carp;
use LWP;
use HTTP::Request::Common;
use Encode qw();
use Data::Dump;
use JSON::PP;


lib/Business/Tax/Avalara.pm  view on Meta::CPAN

	my $user_agent = LWP::UserAgent->new();
	$user_agent->agent( "perl/Business-Tax-Avalara/$VERSION" );
	$user_agent->timeout( $self->{'request_timeout'} );
	
	# Create a request
	my $request = HTTP::Request::Common::POST(
		$request_url,
	);
	
	$request->authorization_basic(
		$self->{'user_name'},

 view all matches for this distribution


Business-Tax-VAT-Validation

 view release on metacpan or  search on metacpan

lib/Business/Tax/VAT/Validation.pm  view on Meta::CPAN

use strict;
use warnings;

our $VERSION = '1.24';

use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use JSON qw/ decode_json /;

=head1 NAME

lib/Business/Tax/VAT/Validation.pm  view on Meta::CPAN

}

sub _check_vies {
  my ($self, $vatNumber, $countryCode) = @_;
  my $ua = $self->_get_ua();
  my $request = HTTP::Request->new(POST => $self->{baseurl});
  $request->content(_in_soap_envelope($vatNumber, $countryCode));
  $request->content_type("text/xml; charset=utf-8");

  my $response = $ua->request($request);

lib/Business/Tax/VAT/Validation.pm  view on Meta::CPAN


sub _check_hmrc {
    my ($self, $vatNumber, $countryCode) = @_;
    my $ua = $self->_get_ua();

    my $request = HTTP::Request->new(GET => $self->{hmrc_baseurl}.$vatNumber);
    $request->header(Accept => 'application/vnd.hmrc.1.0+json');
    my $response = $ua->request($request);

    $self->{res} = $response->decoded_content;
    if ($response->code == 200) {

 view all matches for this distribution


Business-UTV

 view release on metacpan or  search on metacpan

lib/Business/UTV.pm  view on Meta::CPAN


use strict;
use warnings;

use LWP::UserAgent;
use HTTP::Request::Common;
use URI::Escape;

our $VERSION = 0.05;
our $errstr = undef;

 view all matches for this distribution


Business-WebMoney

 view release on metacpan or  search on metacpan

lib/Business/WebMoney.pm  view on Meta::CPAN

our $VERSION = '0.11';

use Carp;
use LWP::UserAgent;
use XML::LibXML;
use HTTP::Request;
use File::Spec;
use POSIX();

sub new
{

lib/Business/WebMoney.pm  view on Meta::CPAN

		unless ($res_content = $req_fields->{debug_response}) {

			my $ua = LWP::UserAgent->new;
			$ua->timeout($self->{timeout} + 1);

			my $req = HTTP::Request->new;
			$req->method('POST');
			$req->uri("https://w3s.wmtransfer.com/asp/XML$args{func}Cert.asp");
			$req->content($req_data);

			my ($res, $timeout);

 view all matches for this distribution


Business-YQL

 view release on metacpan or  search on metacpan

lib/Business/YQL.pm  view on Meta::CPAN

package Business::YQL;
use Moo;

our $VERSION = '0.0004'; # VERSION

use HTTP::Request::Common qw(GET POST);
use URI;
use URI::QueryParam;
use LWP::UserAgent;
use JSON qw(to_json from_json);
use Carp qw(croak);

 view all matches for this distribution


BusyBird

 view release on metacpan or  search on metacpan

t/testlib/HTTP.pm  view on Meta::CPAN

package testlib::HTTP;
use strict;
use warnings;
use BusyBird::Util 'set_param';
use HTTP::Request;
use Test::More;
use Test::Builder;
use JSON qw(from_json);
use HTML::TreeBuilder 5 -weak;
use HTML::TreeBuilder::XPath;

t/testlib/HTTP.pm  view on Meta::CPAN

}

sub request_ok {
    my ($self, $method, $request_url, $content, $res_code_like, $msg) = @_;
    local $Test::Builder::Level = $Test::Builder::Level + 1;
    my $res = $self->{requester}->(HTTP::Request->new($method, $request_url, undef, $content));
    if(defined $res_code_like) {
        like($res->code, $res_code_like, $msg);
    }
    return $res->decoded_content(raise_error => 1);
}

 view all matches for this distribution


CAPE-Utils

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "File::ReadBackwards" : "0",
            "File::Slurp" : "0",
            "File::Spec" : "0",
            "File::Temp" : "0",
            "Gzip::Faster" : "0",
            "HTTP::Request::Common" : "0",
            "IPC::Cmd" : "0",
            "JSON" : "0",
            "LWP::UserAgent" : "0",
            "MIME::Base64" : "0",
            "Mojolicious::Lite" : "0",

 view all matches for this distribution


CDDB

 view release on metacpan or  search on metacpan

lib/CDDB.pm  view on Meta::CPAN

# Determine whether we can use HTTP for requests and submissions.

my $imported_http = 0;
eval {
	require LWP;
	require HTTP::Request;
	$imported_http = 1;
};

#------------------------------------------------------------------------------
# Send a command.  If we're not connected, try to connect first.

 view all matches for this distribution


CDS

 view release on metacpan or  search on metacpan

lib/CDS.pm  view on Meta::CPAN

use Digest::SHA;
use Encode;
use Fcntl;
use HTTP::Date;
use HTTP::Headers;
use HTTP::Request;
use HTTP::Server::Simple;
use LWP::UserAgent;
use Time::Local;
use utf8;
package CDS;

lib/CDS.pm  view on Meta::CPAN

		$headers->header('Condensation-Date' => $date);
		$headers->header('Condensation-Actor' => $keyPair->publicKey->hash->hex);
		$headers->header('Condensation-Signature' => unpack('H*', $signature));
	}

	return LWP::UserAgent->new->request(HTTP::Request->new($method, $url, $headers, $data));
}

# Models a hash, and offers binary and hexadecimal representation.
package CDS::Hash;

 view all matches for this distribution


CGI-Alternatives

 view release on metacpan or  search on metacpan

lib/CGI/Alternatives.pm  view on Meta::CPAN

One major advantage of modern frameworks is testability. All the frameworks
mentioned support easy testing:

    use Test::More;
    use Plack::Test;
    use HTTP::Request::Common;

    my $app = MyApp->to_app;

    test_psgi $app, sub {
        my $cb = shift;

 view all matches for this distribution


CGI-Application-Dispatch-Server

 view release on metacpan or  search on metacpan

lib/CGI/Application/Dispatch/Server.pm  view on Meta::CPAN

    print $response->as_string;
  }

}

# Shamelessly stolen from HTTP::Request::AsCGI by chansen
sub _build_response {
    my ( $self, $stdout ) = @_;

    $stdout =~ s{(.*?\x0d?\x0a\x0d?\x0a)}{}xsm;
    my $headers = $1;

lib/CGI/Application/Dispatch/Server.pm  view on Meta::CPAN

if you have found a bug, please report it through rt.cpan.org. 

=head1 ACKNOWLEDGEMENTS

This module was cloned from L<CGI::Application::Server|CGI::Application::Server>, which in turn 
borrowed significant parts from L<HTTP::Request::AsCGI|HTTP::Requeste::AsCGI>.

=head1 CONTRIBUTORS

George Hartzell E<lt>hartzell@alerce.comE<gt> 
Mark Stosberg

 view all matches for this distribution


CGI-Application-Dispatch

 view release on metacpan or  search on metacpan

t/psgi.t  view on Meta::CPAN

# make sure we can get to our modules
use lib 't/lib';
use Test::More 'no_plan';
use Plack::Test;
use HTTP::Request::Common;
use CGI::Application::Dispatch::PSGI;
use Module::Name;
use MyApp::Module::Name;
use MyApp::DispatchPSGI;
use MyApp::DispatchTablePSGI;

 view all matches for this distribution


CGI-Application-Emulate-PSGI

 view release on metacpan or  search on metacpan

t/00base.t  view on Meta::CPAN

        my $ca = MyCGIApp->new;
        $ca->run;
    }),
    client => sub {
        my $cb = shift;
        my $req = HTTP::Request->new(GET => 'http://localhost/');
        my $res = $cb->($req);
        is $res->code, 200, 'status code is 200';
        is $res->content_type, 'application/x-hello-world', 'content-type';
        is $res->content, 'hello world', 'body';
    };

 view all matches for this distribution


( run in 1.866 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )