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


CaCORE

 view release on metacpan or  search on metacpan

examples/EVStest.pl  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;
use HTTP::Request::Common;
use CaCORE::ApplicationService;
use CaCORE::EVS;

#
# ApplicationService is a utility classs that encapsulates webservice invocation to caCORE server.

 view all matches for this distribution


Cache-Ehcache

 view release on metacpan or  search on metacpan

lib/Cache/Ehcache.pm  view on Meta::CPAN

    return {%args};
}

sub BUILD {
    my $self = shift;
    my $req  = HTTP::Request->new( 'PUT', $self->_make_url() );
    my $res  = $self->ua->request($req);
}

__PACKAGE__->meta->make_immutable;
no Moose;

use HTTP::Request;
use HTTP::Status qw(:constants);

sub set {
    my $self = shift;
    my ( $key, $value, $expires_in ) = @_;

    my @header =
      ($expires_in) ? ( 'ehcacheTimeToLiveSeconds' => $expires_in ) : ();
    my $req =
      HTTP::Request->new( 'PUT', $self->_make_url($key), \@header, $value );
    my $res = $self->ua->request($req);
    unless ( $res->is_success ) {
        warn $res->status_line . "\n";
    }
}

lib/Cache/Ehcache.pm  view on Meta::CPAN

}

sub delete {
    my $self  = shift;
    my ($key) = @_;
    my $req   = HTTP::Request->new( 'DELETE', $self->_make_url($key) );
    my $res   = $self->ua->request($req);
    if ( !$res->is_success && $res->code != HTTP_NOT_FOUND ) {
        warn $res->status_line . "\n";
    }
}

sub clear {
    my $self = shift;
    my $req  = HTTP::Request->new( 'DELETE', $self->_make_url('*') );
    my $res  = $self->ua->request($req);
    unless ( $res->is_success ) {
        warn $res->status_line . "\n";
    }
}

 view all matches for this distribution


CanvasCloud

 view release on metacpan or  search on metacpan

lib/CanvasCloud/API.pm  view on Meta::CPAN

}


sub request {
    my ( $self, $method, $uri ) = @_;
    my $r = HTTP::Request->new( $method => $uri );
    $r->header( 'Authorization' => 'Bearer '.$self->token );
    return $r;
}


lib/CanvasCloud/API.pm  view on Meta::CPAN

        die 'Bad Link: none of listed relation found - '.join(', ', keys %struct) unless ( $TYPE );
    }
    return \%struct;
}

## Taken from HTTP::Request::Common


sub encode_url {
   my ( $self, $content ) = @_;
   my $url = URI->new('http:');

lib/CanvasCloud/API.pm  view on Meta::CPAN


Base uri for Canvas LMS

=head2 request( $method, $uri )

returns HTTP::Request;

request creates a HTTP::Request->new( $method => $uri ) it then sets the 'Authorization' header

=head2 send( $request )

Attempts to send request to Canvas recursively depending on return Link header.
Finally returns a hashref data structure as response from Canvas.

 view all matches for this distribution


Captcha-AreYouAHuman

 view release on metacpan or  search on metacpan

lib/Captcha/AreYouAHuman.pm  view on Meta::CPAN

        }


        # Make the request
        my $ua = LWP::UserAgent->new;
        my $req = HTTP::Request->new(POST => 'https://' . $server .
                        '/ayahwebservices/index.php/ayahwebservice/scoreGame');
        $req->content_type('application/x-www-form-urlencoded');
        $req->content('session_secret=' . uri_escape($session_secret) . '&client_ip=' . 
			uri_escape($client_ip));
        my $res = $ua->request($req);

 view all matches for this distribution


Carrot

 view release on metacpan or  search on metacpan

lib/Carrot/Personality/Structured/Internet/Protocol/HTTP/Request./unit_tests/proof_of_concept.pl  view on Meta::CPAN

package main
# /type library
# /capability "Proof of concept for ::HTTP::Request"
{
	use strict;
	use warnings 'FATAL' => 'all';

	my $expressiveness = Carrot::individuality;
	$expressiveness->package_resolver->provide(
		my $request_class = '::Personality::Structured::Internet::Protocol::HTTP::Request');

	my $request = $request_class->indirect_constructor;
	$request->header_lines->header_host->assign_value('localhost');
	$request->line->method->assign_value('GET');

 view all matches for this distribution


Catalyst-Action-FromPSGI

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Plack" : "0.992"
         }
      },
      "test" : {
         "requires" : {
            "HTTP::Request::Common" : "0",
            "Test::More" : "0.88",
            "Web::Simple" : "0.016"
         }
      }
   },

 view all matches for this distribution


Catalyst-Action-REST

 view release on metacpan or  search on metacpan

t/lib/Test/Rest.pm  view on Meta::CPAN

                {
                    url     => { type => SCALAR },
                    headers => { type => HASHREF, default => {} },
                },
            );
            my $req  = HTTP::Request->new( "$method" => $p{'url'} );
            $req->header( $_ => $p{headers}{$_} ) for keys %{ $p{headers} };
            $req->content_type( $self->{'content_type'} );
            return $req;
        };
    }

t/lib/Test/Rest.pm  view on Meta::CPAN

                    url  => { type => SCALAR },
                    data => 1,
                    headers => { type => HASHREF, default => {} },
                },
            );
            my $req = HTTP::Request->new( "$method" => $p{'url'} );
            $req->header( $_ => $p{headers}{$_} ) for keys %{ $p{headers} };
            $req->content_type( $self->{'content_type'} );
            $req->content_length(
                do { use bytes; length( $p{'data'} ) }
            );

 view all matches for this distribution


Catalyst-Action-RenderView-ErrorHandler

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Catalyst::View" : "0",
            "Catalyst::View::TT" : "0",
            "File::Find" : "0",
            "File::Temp" : "0",
            "FindBin" : "0",
            "HTTP::Request::AsCGI" : "0",
            "Test::More" : "0.96",
            "Text::Diff" : "0",
            "base" : "0",
            "lib" : "0"
         }

 view all matches for this distribution


Catalyst-Action-RenderView

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Catalyst-Action-RenderView

0.17    2024-10-12
  - fix Makefile.PL to work without PERL_USE_UNSAFE_INC
  - revised packaging to use Dist::Zilla
  - drop unused prereq HTTP::Request::AsCGI

0.16 2011-01-05 19:28:00 GMT
  - Fix bug accidentally introduced in the last version with response
    3xx statuses.

 view all matches for this distribution


Catalyst-Action-Serialize-Data-Serializer

 view release on metacpan or  search on metacpan

t/lib/Test/Rest.pm  view on Meta::CPAN

                {
                    url     => { type => SCALAR },
                    headers => { type => HASHREF, default => {} },
                },
            );
            my $req  = HTTP::Request->new( "$method" => $p{'url'} );
            $req->header( $_ => $p{headers}{$_} ) for keys %{ $p{headers} };
            $req->content_type( $self->{'content_type'} );
            return $req;
        };
    }

t/lib/Test/Rest.pm  view on Meta::CPAN

                    url  => { type => SCALAR },
                    data => 1,
                    headers => { type => HASHREF, default => {} },
                },
            );
            my $req = HTTP::Request->new( "$method" => $p{'url'} );
            $req->header( $_ => $p{headers}{$_} ) for keys %{ $p{headers} };
            $req->content_type( $self->{'content_type'} );
            $req->content_length(
                do { use bytes; length( $p{'data'} ) }
            );

 view all matches for this distribution


Catalyst-ActionRole-BuildDBICResult

 view release on metacpan or  search on metacpan

t/app.t  view on Meta::CPAN

use strict;
use warnings FATAL => 'all';
use Test::More 0.89;
use HTTP::Request::Common qw/GET POST DELETE/;

use FindBin;
use lib "$FindBin::Bin/lib";

use TestApp;

 view all matches for this distribution


Catalyst-ActionRole-JMS

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Catalyst::Runtime" : "5.90013",
            "Catalyst::ScriptRunner" : "0",
            "Catalyst::Test" : "0",
            "Data::Printer" : "0",
            "FindBin::libs" : "0",
            "HTTP::Request" : "0",
            "JSON" : "0",
            "JSON::XS" : "0",
            "Net::Stomp" : "0",
            "Test::Most" : "0",
            "bytes" : "0"

 view all matches for this distribution


Catalyst-ActionRole-MatchRequestAccepts

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

build_requires:
  Catalyst: 0
  Catalyst::Controller::ActionRole: 0
  Catalyst::Test: 0
  ExtUtils::MakeMaker: 6.59
  HTTP::Request::Common: 0
  Moose: 0
  Test::More: '0.96'
configure_requires:
  ExtUtils::MakeMaker: 6.59
distribution_type: module

 view all matches for this distribution


Catalyst-ActionRole-MatchRequestMethod

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

   ],
   "build_requires" : {
      "Catalyst::Controller::ActionRole" : "0",
      "Catalyst::Test" : "0",
      "FindBin" : "0",
      "HTTP::Request::Common" : "0",
      "Moose" : "1.03",
      "Test::More" : "0.89"
   },
   "configure_requires" : {
      "ExtUtils::MakeMaker" : "6.31"

 view all matches for this distribution


Catalyst-ActionRole-Methods

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Release history for Catalyst-ActionRole-Methods

0.104 - 2024-03-21
  - Support for HTTP::Request::Common < 6.21

0.103 - 2024-02-25
  - Correct content type for the default 405 response
  - Minor code cleanups and speedups
  - Improved documentation

 view all matches for this distribution


Catalyst-ActionRole-NamedFields

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

  
  MyApp->setup;
}

use Catalyst::Test 'MyApp';
use HTTP::Request::Common;

{
  ok my $res = request(GET '/22?foo=44&bar=55&bar=66&baz=77');
}

 view all matches for this distribution


Catalyst-ActionRole-QueryParameter

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

abstract: 'Constraints for your Query parameters'
author:
  - 'John Napiorkowski <jjnapiork@cpan.org>'
build_requires:
  Catalyst: '5.90103'
  HTTP::Request::Common: '0'
  Test::Most: '0'
  Type::Tiny: '1.000005'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 0

 view all matches for this distribution


Catalyst-ActionRole-Renderer

 view release on metacpan or  search on metacpan

t/02_render.t  view on Meta::CPAN

use FindBin qw($Bin);
use lib "$Bin/lib";

use Test::More;
use Catalyst::Test 'TestApp';
use HTTP::Request::Common;
use_ok('Catalyst::Test', 'TestApp');

# render TT
{
    ok my $res = request GET '/render_tt';

 view all matches for this distribution


Catalyst-ActionRole-RequireSSL

 view release on metacpan or  search on metacpan

t/10_ssl.t  view on Meta::CPAN

use FindBin;
use lib "$FindBin::Bin/lib";

use Test::More tests => 29;
use Catalyst::Test 'TestApp';
use HTTP::Request::Common;

ok( my $res = request('https://localhost/root_ssl'), 'request ok' );
is( $res->code, 200, 'SSL request to SSL' );

my $ctx;

 view all matches for this distribution


Catalyst-Authentication-AuthTkt

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

  Catalyst::Plugin::Session::State::Cookie: 0
  Catalyst::Plugin::Session::Store::Dummy: 0
  Catalyst::Plugin::Static::Simple: 0
  ExtUtils::MakeMaker: 6.59
  HTTP::Cookies: 0
  HTTP::Request::AsCGI: 0
  Test::More: 0
configure_requires:
  ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1

 view all matches for this distribution


Catalyst-Authentication-Credential-Crowd

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Credential/Crowd.pm  view on Meta::CPAN

use warnings;

our $VERSION = '0.07';

use Moose;
use HTTP::Request;
use LWP::UserAgent;
use JSON;

has 'authen_url' => (
    is => 'ro',

lib/Catalyst/Authentication/Credential/Crowd.pm  view on Meta::CPAN

    my ( $self, $username, $password ) = @_;
    my $ua = LWP::UserAgent->new;
    my $uri = $self->authen_url."?username=$username";
    my $json_hash = { value => $password };
    my $json = to_json( $json_hash );
    my $req = HTTP::Request->new( 'POST',  $uri );
    $req->authorization_basic(
        $self->app->{app_name},
        $self->app->{password}
    );
    $req->header('Accept' => 'application/json');

 view all matches for this distribution


Catalyst-Authentication-Credential-HTTP-Proxy

 view release on metacpan or  search on metacpan

t/live_app.t  view on Meta::CPAN

    eval { require Test::WWW::Mechanize::Catalyst }
      or plan skip_all =>
      "Test::WWW::Mechanize::Catalyst is needed for this test";
    plan tests => 9;
}
use HTTP::Request;
{
    package AuthTestApp;
    use Catalyst qw/
      Authentication
      /;

t/live_app.t  view on Meta::CPAN

        is( $mech->status, 401, "status is 401" ) or die $mech->content;
        $mech->content_lacks( "foo", "no output" );
    }
    
    {# HTTP with auth
        my $r = HTTP::Request->new( GET => "http://localhost/moose" );
        $r->authorization_basic(qw/foo s3cr3t/);
#        $mech->request($r);
        is( $mech->status, 200, "status is 200" );
        $mech->content_contains( "test realm:foo", "test realm:foo output" );
    }

    {   # HTTP with other auth
        my $r = HTTP::Request->new( GET => "http://localhost/moose" );
        $r->authorization_basic(qw/foo proxypass/);
#        $mech->request($r);
        is( $mech->status, 401, "status is 401" ) or die $mech->content;
    }
}

t/live_app.t  view on Meta::CPAN

        is( $mech->status, 401, "status is 401" ) or die $mech->content;
        $mech->content_lacks( "foo", "no output" );
    }
    
    {   # Proxy with other auth
        my $r = HTTP::Request->new( GET => "http://localhost/yak" );
        $r->authorization_basic(qw/foo s3cr3t/);
#        $mech->request($r);
        is( $mech->status, 401, "status is 401" ) or die $mech->content;
    }

    {   # HTTP with other auth
        my $r = HTTP::Request->new( GET => "http://localhost/yak" );
        $r->authorization_basic(qw/foo proxypass/);
#        $mech->request($r);
        is( $mech->status, 200, "status is 200" );
        $mech->content_contains( "test_proxy realm:foo", "test_proxy realm:foo output" );
    }

 view all matches for this distribution


Catalyst-Authentication-Credential-HTTP

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         "requires" : {
            "Catalyst::Controller" : "0",
            "File::Spec" : "0",
            "FindBin" : "0",
            "HTTP::Headers" : "0",
            "HTTP::Request" : "0",
            "Module::Metadata" : "0",
            "Test::Exception" : "0",
            "Test::MockObject" : "0",
            "Test::MockObject::Extends" : "0",
            "Test::More" : "0",

 view all matches for this distribution


Catalyst-Authentication-Credential-OAuth

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN

use MooseX::Types::Moose qw/ Bool HashRef /;
use MooseX::Types::Common::String qw/ NonEmptySimpleStr /;
use Net::OAuth;
#$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
use LWP::UserAgent;
use HTTP::Request::Common;
use String::Random qw/ random_string /;
use Catalyst::Exception ();
use namespace::autoclean;

our $VERSION = '0.04';

 view all matches for this distribution


Catalyst-Authentication-Store-Crowd

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Store/Crowd.pm  view on Meta::CPAN


use warnings;
use Moose;

use LWP::UserAgent;
use HTTP::Request;
use JSON;

use Catalyst::Authentication::Store::Crowd::User;

has 'find_user_url' => (

lib/Catalyst/Authentication/Store/Crowd.pm  view on Meta::CPAN


sub _crowd_get_user {
    my ( $self, $username ) = @_;
    my $ua = LWP::UserAgent->new;
    my $uri = $self->find_user_url."?username=$username";
    my $req = HTTP::Request->new( 'GET',  $uri );
    $req->authorization_basic(
        $self->app->{app_name},
        $self->app->{password}
    );
    $req->header('Accept' => 'application/json');

 view all matches for this distribution


Catalyst-ComponentRole-PathFrom

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

build_requires:
  Catalyst::Component::InstancePerContext: '0'
  Catalyst::Test: '0'
  File::Spec: '0'
  FindBin: '0'
  HTTP::Request::Common: '0'
  Test::Most: '0.34'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001'

 view all matches for this distribution


Catalyst-Controller-Atompub

 view release on metacpan or  search on metacpan

inc/Test/WWW/Mechanize/Catalyst.pm  view on Meta::CPAN


        # no-one *should* be returning non-absolute URLs, but if they
        # are then we'd better cope with it.  Let's create a new URI, using
        # our request as the base.
        my $uri = URI->new_abs( $location, $request->uri )->as_string;
        my $referral = HTTP::Request->new( GET => $uri );
        return $self->request( $referral, $arg, $size, $response );
    } else {
        $response->{_raw_content} = $response->content;
    }

 view all matches for this distribution


Catalyst-Controller-DBIC-API

 view release on metacpan or  search on metacpan

t/rest/create.t  view on Meta::CPAN


use RestTest;
use DBICTest;
use Test::More;
use Test::WWW::Mechanize::Catalyst 'RestTest';
use HTTP::Request::Common;
use JSON::MaybeXS;

my $json = JSON::MaybeXS->new(utf8 => 1);

my $mech = Test::WWW::Mechanize::Catalyst->new;

 view all matches for this distribution


Catalyst-Controller-ElasticSearch

 view release on metacpan or  search on metacpan

t/lib/MyTest.pm  view on Meta::CPAN

#   The MIT (X11) License
#
package MyTest;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;
use JSON;

use base 'Exporter';
our @EXPORT = qw(test_json GET POST encode_json);

my $app = require MyApp;

sub POST {
	my ($target, %args) = @_;
	return HTTP::Request::Common::POST($target, %args, "Content-Type" => "application/json");
}

sub test_json {
	my ($req, $json, $msg) = @_;
	test_psgi $app, sub {

 view all matches for this distribution



( run in 1.493 second using v1.01-cache-2.11-cpan-39bf76dae61 )