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


Ambrosia

 view release on metacpan or  search on metacpan

share/Managers/buildConfig.pm  view on Meta::CPAN

    return $template;
}

#sub downloadLib
#{
#    my $req = HTTP::Request->new(GET => 'http://download.dojotoolkit.org/release-1.7.2/dojo-release-1.7.2.tar.gz');
#}

1;

__DATA__

 view all matches for this distribution


Amethyst

 view release on metacpan or  search on metacpan

Amethyst/Brain/Infobot/Module/Exchange.pm  view on Meta::CPAN

		%CODE2CURR
				$REFERER $CONVERTER);
use Data::Dumper;
use POE;
use POE::Component::Client::UserAgent;
use HTTP::Request::Common;
use HTTP::Response;
use LWP::UserAgent;	# For init
use Amethyst::Message;
use Amethyst::Brain::Infobot;
use Amethyst::Brain::Infobot::Module;

Amethyst/Brain/Infobot/Module/Exchange.pm  view on Meta::CPAN

	$REFERER = 'http://www.xe.net/ucc/full.shtml';
	$CONVERTER ='http://www.xe.net/ucc/convert.cgi';

	my $ua = new LWP::UserAgent;
	my $uri = new URI($REFERER);
	my $request = new HTTP::Request(GET => $uri);

	print STDERR "Requesting $uri\n";

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

Amethyst/Brain/Infobot/Module/Exchange.pm  view on Meta::CPAN

			From		=> $fcode,
			To			=> $tcode,
			Amount		=> $number,
				);
	$uri = $uri->canonical;
	my $request = new HTTP::Request(GET => $uri);
	$request->referer($REFERER);

	my $postback = $session->postback('response');

	$kernel->post('useragent', 'request',

 view all matches for this distribution


Amon2-Lite

 view release on metacpan or  search on metacpan

lib/Amon2/Setup/Flavor/Lite.pm  view on Meta::CPAN

my $app = Plack::Util::load_psgi 'app.psgi';
test_psgi
    app => $app,
    client => sub {
        my $cb = shift;
        my $req = HTTP::Request->new(GET => 'http://localhost/');
        my $res = $cb->($req);
        is $res->code, 200;
        diag $res->content if $res->code != 200;
    };

 view all matches for this distribution


Amon2-Plugin-L10N

 view release on metacpan or  search on metacpan

t/01_simple.t  view on Meta::CPAN

subtest 'en' => sub {
    test_psgi(
        app    => $app,
        client => sub {
            my $cb = shift;
            my $res = $cb->(HTTP::Request->new(
                GET => 'http://localhost/',
                [ 'Accept-Language', 'en' ],
            ));
            is $res->content, 'Hello, yappo';
        }

t/01_simple.t  view on Meta::CPAN

subtest 'ja' => sub {
    test_psgi(
        app    => $app,
        client => sub {
            my $cb = shift;
            my $res = $cb->(HTTP::Request->new(
                GET => 'http://localhost/',
                [ 'Accept-Language', 'en;q=0.1, ja;q=0.12' ],
            ));
            is $res->content, 'yappo さん、こんにちは';
        }

t/01_simple.t  view on Meta::CPAN

subtest 'default' => sub {
    test_psgi(
        app    => $app,
        client => sub {
            my $cb = shift;
            my $res = $cb->(HTTP::Request->new(
                GET => 'http://localhost/',
                [ 'Accept-Language', 'th' ],
            ));
            is $res->content, 'Hello, yappo';
        }

 view all matches for this distribution


Amon2-Plugin-Web-CSRFDefender

 view release on metacpan or  search on metacpan

t/009_csrf_defender.t  view on Meta::CPAN

    subtest 'deny' => sub {
        test_psgi
            app => $app,
            client => sub {
                my $cb = shift;
                my $res = $cb->(HTTP::Request->new(POST => 'http://localhost/do'));
                is $res->code, '403';
                is $COMMIT, 0;
            };
    };

    subtest 'get_csrf_defender_token' => sub {
        test_psgi
            app => $app,
            client => sub {
                my $cb = shift;
                my $res = $cb->(HTTP::Request->new(GET => 'http://localhost/get_csrf_defender_token'));
                is $res->code, '200';
                ::like $res->content(), qr{^[a-zA-Z0-9_-]{40}$};
            };
    };
};

 view all matches for this distribution


Amon2-Plugin-Web-CpanelJSON

 view release on metacpan or  search on metacpan

t/01_render_json.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Plack::Test;
use HTTP::Request::Common;
use Cpanel::JSON::XS::Type;

{
    package MyApp::Web;
    use parent qw(Amon2 Amon2::Web);

 view all matches for this distribution


Amon2-Plugin-Web-Flash

 view release on metacpan or  search on metacpan

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

    subtest $desc => sub {
        test_psgi(
            app => $app,
            client => sub {
                my $cb = shift;
                $cb->(HTTP::Request->new(GET => "http://localhost/session")); # set session_id
                $sub->($cb);
                done_testing;
            }
        );
    };
}

sub request {
    my ($cb, $action) = @_;

    my $res = $cb->(HTTP::Request->new(GET => "http://localhost/$action?$session_key=$session_id"));
    note $res->content;
    return $res->content;
}

##### Tests starts here ####

 view all matches for this distribution


Amon2-Plugin-Web-Maintenance

 view release on metacpan or  search on metacpan

cpanfile.snapshot  view on Meta::CPAN

      HTML::Form::TextInput 6.03
    requirements:
      Encode 2
      ExtUtils::MakeMaker 0
      HTML::TokeParser 0
      HTTP::Request 6
      HTTP::Request::Common 6.03
      URI 1.10
      perl 5.008001
  HTML-Parser-3.71
    pathname: G/GA/GAAS/HTML-Parser-3.71.tar.gz
    provides:

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
      HTML::Parser 3.33
      HTML::TokeParser 2.28
      HTML::TreeBuilder 0
      HTTP::Daemon 0
      HTTP::Request 1.3
      HTTP::Server::Simple 0.35
      HTTP::Server::Simple::CGI 0
      HTTP::Status 0
      LWP 5.829
      LWP::UserAgent 5.829

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


Amon2

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "File::Which" : "0",
            "File::pushd" : "0",
            "Furl" : "0",
            "HTML::StickyQuery" : "0",
            "HTTP::MobileAgent" : "0",
            "HTTP::Request::Common" : "0",
            "HTTP::Session::Store::OnMemory" : "0",
            "Module::Find" : "0",
            "Module::Functions" : "0",
            "Plack::Builder" : "0",
            "Plack::Middleware::Lint" : "0",

 view all matches for this distribution


Any-Daemon-HTTP

 view release on metacpan or  search on metacpan

lib/Any/Daemon/FCGI/ClientConn.pm  view on Meta::CPAN

use warnings;
use strict;

use Log::Report      'any-daemon-http';

use HTTP::Request ();
use Time::HiRes   qw(usleep);
use Errno         qw(EAGAIN EINTR EWOULDBLOCK);
use IO::Select    ();
use Socket        qw/inet_aton PF_INET AF_INET SHUT_RD SHUT_WR/;

lib/Any/Daemon/FCGI/ClientConn.pm  view on Meta::CPAN

      , RESERVED, RESERVED, RESERVED;

    $self->_reply_record(END_REQUEST => $req_id, $body);
}

# Convert the FGCI request into a full HTTP::Request object
sub _body2hash($$)
{   my ($self, $body) = @_;
    my %h;

    while(length $$body)

 view all matches for this distribution


AnyData

 view release on metacpan or  search on metacpan

lib/AnyData/Storage/RAM.pm  view on Meta::CPAN

    my $pass = $self->{pass} || $self->{password};
    eval{ require 'LWP/UserAgent.pm'; };
#    eval{ require 'File/DosGlob.pm'; };
    die "LWP module not found! $@" if $@;
    my $ua   = LWP::UserAgent->new;
    my $req  = HTTP::Request->new(GET => $file);
    $req->authorization_basic($user, $pass) if $user and $pass;
    my $res  = $ua->request($req);
    die "[$file] : " . $res->message if !$res->is_success;
    $^W = 1;
    return $res->content;

 view all matches for this distribution


AnyEvent-Curl-Multi

 view release on metacpan or  search on metacpan

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

  #
  # Schedule callbacks to be fired when a response is received,
  # or when an error occurs.
  $client->reg_cb(response => sub {
      my ($client, $request, $response, $stats) = @_;
      # $response is an HTTP::Request object
  });
  $client->reg_cb(error => sub {
      my ($client, $request, $errmsg, $stats) = @_;
      # ...
  });
  my $request = HTTP::Request->new(...);
  $client->request($request);

  # Method 2: AnyEvent::CondVar pattern
  # Do not use this pattern in an existing event loop!
  my $handle = $client->request($request);
  eval {
      my ($response, $stats) = $handle->cv->recv;
      # $response is an HTTP::Request object
      # ...
  }; 
  if ($@) {
      my $errmsg = $@;
      # ...

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

=back

=head2 Issuing requests

To dispatch HTTP requests to the client, use the request() method.  request()
takes an HTTP::Request object as the first argument, and a list of
attribute-value pairs as the remaining arguments:
  
  $handle = $client->request($request, ...);

The following attributes are accepted:

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

    my $self = shift;
    my ($req, %opts) = @_;

    my $easy_h; 

    if ($req->isa("HTTP::Request")) {
        # Convert to WWW::Curl::Easy
        $easy_h = $self->_gen_easy_h($req, %opts);
    } else {
        croak "Unsupported request type";
    }

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

SSL peer verification is disabled.  If you consider this a serious problem,
please contact the author.

=head1 SEE ALSO

L<AnyEvent>, L<AnyEvent::Handle>, L<Object::Event>, L<HTTP::Request>,
L<HTTP::Response>

=head1 AUTHORS AND CONTRIBUTORS

Michael S. Fischer (L<michael+cpan@dynamine.net>) released the original version

 view all matches for this distribution


AnyEvent-DAAP-Server

 view release on metacpan or  search on metacpan

lib/AnyEvent/DAAP/Server.pm  view on Meta::CPAN

use AnyEvent::DAAP::Server::Connection;
use AnyEvent::Socket;
use AnyEvent::Handle;
use Net::Rendezvous::Publish;
use Net::DAAP::DMAP qw(dmap_pack);
use HTTP::Request;
use Router::Simple;
use URI::QueryParam;

our $VERSION = '0.01';

lib/AnyEvent/DAAP/Server.pm  view on Meta::CPAN

        $connection->handle->on_read(sub {
            my ($handle) = @_;
            $handle->push_read(
                regex => qr<\r\n\r\n>, sub {
                    my ($handle, $data) = @_;
                    my $request = HTTP::Request->parse($data);
                    my $path = $request->uri->path;
                    my $p = $self->router->match($path) || {};
                    my $method = $p->{method} || $path;
                    $method =~ s<[/-]><_>g;
                    $self->$method($connection, $request, $p);

 view all matches for this distribution


AnyEvent-Discord-Client

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN


use AnyEvent::WebSocket::Client;
use LWP::UserAgent;
use JSON;
use URI;
use HTTP::Request;
use HTTP::Headers;
use AnyEvent::HTTP;

my $debug = 0;

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN

}

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

  my $resp = $self->{ua}->request(HTTP::Request->new(
    uc($method),
    $self->{api_root} . $path,
    HTTP::Headers->new(
      Authorization => "Bot $self->{token}",
      User_Agent => $self->{api_useragent},

 view all matches for this distribution


AnyEvent-Discord

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord.pm  view on Meta::CPAN

  use AnyEvent::Discord::Payload;
  use AnyEvent::WebSocket::Client;
  use Data::Dumper;
  use JSON qw(decode_json encode_json);
  use LWP::UserAgent;
  use HTTP::Request;
  use HTTP::Headers;

  our $VERSION = '0.7';
  has version => ( is => 'ro', isa => Str, default => $VERSION );

lib/AnyEvent/Discord.pm  view on Meta::CPAN

    my $headers = HTTP::Headers->new(
      Authorization => 'Bot ' . $self->token,
      User_Agent    => $self->user_agent,
      Content_Type  => 'application/json',
    );
    my $request = HTTP::Request->new(
      uc($method),
      join('/', $self->base_uri, $path),
      $headers,
      $payload,
    );

 view all matches for this distribution


AnyEvent-HTTP-LWP-UserAgent-Determined

 view release on metacpan or  search on metacpan

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

BEGIN { plan tests => 14; }

BEGIN { use_ok('AnyEvent::HTTP::LWP::UserAgent::Determined') }

use HTTP::Headers;
use HTTP::Request;
use HTTP::Request::Common qw( GET );

sub timings {
  my $self = shift;
  # copied from module, line 20
  my(@timing_tries) = ( $self->timing() =~ m<(\d+(?:\.\d+)*)>g );

 view all matches for this distribution


AnyEvent-HTTP-LWP-UserAgent

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/LWP/UserAgent.pm  view on Meta::CPAN

sub simple_request {
    return shift->simple_request_async(@_)->recv;
}

sub get_async {
    require HTTP::Request::Common;
    my($self, @parameters) = @_;
    my @suff = $self->_process_colonic_headers(\@parameters,1);
    return $self->request_async( HTTP::Request::Common::GET( @parameters ), @suff );
}


sub post_async {
    require HTTP::Request::Common;
    my($self, @parameters) = @_;
    my @suff = $self->_process_colonic_headers(\@parameters, (ref($parameters[1]) ? 2 : 1));
    return $self->request_async( HTTP::Request::Common::POST( @parameters ), @suff );
}


sub head_async {
    require HTTP::Request::Common;
    my($self, @parameters) = @_;
    my @suff = $self->_process_colonic_headers(\@parameters,1);
    return $self->request_async( HTTP::Request::Common::HEAD( @parameters ), @suff );
}


sub put_async {
    require HTTP::Request::Common;
    my($self, @parameters) = @_;
    my @suff = $self->_process_colonic_headers(\@parameters, (ref($parameters[1]) ? 2 : 1));
    return $self->request_async( HTTP::Request::Common::PUT( @parameters ), @suff );
}


sub delete_async {
    require HTTP::Request::Common;
    my($self, @parameters) = @_;
    my @suff = $self->_process_colonic_headers(\@parameters,1);
    return $self->request_async( HTTP::Request::Common::DELETE( @parameters ), @suff );
}

sub get {
    return shift->get_async(@_)->recv;
}

lib/AnyEvent/HTTP/LWP/UserAgent.pm  view on Meta::CPAN

When you use Coro you have a choice: you can use L<Coro::LWP> or L<AnyEvent::HTTP>
(if you want to make asynchronous HTTP requests).
If you use Coro::LWP, some modules may work incorrectly (for example Cache::Memcached)
because of global change of IO::Socket behavior.
AnyEvent::HTTP uses different programming interface, so you must change more of your
old code with LWP::UserAgent (and HTTP::Request and so on), if you want to make
asynchronous code.

AnyEvent::HTTP::LWP::UserAgent uses AnyEvent::HTTP inside but have an interface of
LWP::UserAgent.
You can safely use this module in Coro environment (and possibly in AnyEvent too).

 view all matches for this distribution



AnyEvent-HTTP-ScopedClient

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/ScopedClient.pm  view on Meta::CPAN

use namespace::autoclean;

use URI;
use Try::Tiny;
use MIME::Base64;
use HTTP::Request;
use Encode qw/encode_utf8/;
use AnyEvent::HTTP;
use URI::QueryParam;
use URI::Escape;

 view all matches for this distribution


AnyEvent-HTTPD-ExtDirect

 view release on metacpan or  search on metacpan

t/lib/RPC/ExtDirect/Test/Util/AnyEvent.pm  view on Meta::CPAN

use AnyEvent::Impl::Perl;
use AnyEvent;
use AnyEvent::HTTPD::Util;

use URI::http;
use HTTP::Request;
use HTTP::Request::Common;
use HTTP::Response;
use JSON;

use RPC::ExtDirect::Config;
use RPC::ExtDirect::Test::Util;

t/lib/RPC/ExtDirect/Test/Util/AnyEvent.pm  view on Meta::CPAN

    };
}

### NON EXPORTED PUBLIC PACKAGE SUBROUTINE ###
#
# Return a new HTTP::Request object for a raw GET call
#

sub raw_get {
    # This can be called either as a class method, or a plain sub
    shift if $_[0] eq __PACKAGE__;
    
    my ($url) = @_;
    
    my $req = HTTP::Request::Common::GET $url;
    $req->protocol('HTTP/1.0');
    
    return $req;
}

### NON EXPORTED PUBLIC PACKAGE SUBROUTINE ###
#
# Return a new HTTP::Request object for a raw POST call
#

sub raw_post {
    # This can be called either as a class method, or a plain sub
    shift if $_[0] eq __PACKAGE__;
    
    my ($url, $content) = @_;
    
    my $req = HTTP::Request::Common::POST $url,
                Content_Type => 'application/json',
                Content      => $content
           ;
    $req->protocol('HTTP/1.0');
    
    return $req;
}

### NON EXPORTED PUBLIC PACKAGE SUBROUTINE ###
#
# Return a new HTTP::Request object for a form call
#

sub form_post {
    # This can be called either as a class method, or a plain sub
    shift if $_[0] eq __PACKAGE__;
    
    my ($url, @fields) = @_;

    my $req = HTTP::Request::Common::POST $url, Content => [ @fields ];
    $req->protocol('HTTP/1.0');
    
    return $req;
}

### NON EXPORTED PUBLIC PACKAGE SUBROUTINE ###
#
# Return a new HTTP::Request object for a form call
# with file uploads
#

sub form_upload {
    # This can be called either as a class method, or a plain sub

t/lib/RPC/ExtDirect/Test/Util/AnyEvent.pm  view on Meta::CPAN

    
    my ($url, $files, @fields) = @_;

    my $type = 'application/octet-stream';

    my $req = HTTP::Request::Common::POST $url,
           Content_Type => 'form-data',
           Content      => [ @fields,
                             map {
                                    (   upload => [
                                            "t/data/cgi-data/$_",

 view all matches for this distribution


AnyEvent-HTTPD

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.71    Sat Aug  8 00:43:58 CEST 2009
        - fixed the published tests. they used Coro.

0.7     Fri Aug  7 15:37:27 CEST 2009
        - fixed documentation in AE::HTTP::Request.
        - added asynchronous response functionality,
          for sending large files via AnyEvent::AIO for instance.
        - added tests to distribution (instead of maintainer only tests).
        - fixed a bug with reception of requests without headers.

 view all matches for this distribution


AnyEvent-ImageShack

 view release on metacpan or  search on metacpan

lib/AnyEvent/ImageShack.pm  view on Meta::CPAN

package AnyEvent::ImageShack;

use strict;
use AnyEvent::HTTP;
use HTTP::Request::Common 'POST';
use base 'Exporter';
our $VERSION = '0.2';

our @EXPORT = qw(image_host);

 view all matches for this distribution


AnyEvent-Net-Amazon-S3

 view release on metacpan or  search on metacpan

lib/AnyEvent/Net/Amazon/S3/HTTPRequest.pm  view on Meta::CPAN

package AnyEvent::Net::Amazon::S3::HTTPRequest;

# ABSTRACT: Create a signed HTTP::Request
our $VERSION = 'v0.04.0.80'; # VERSION

use strict;
use warnings;

lib/AnyEvent/Net/Amazon/S3/HTTPRequest.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

AnyEvent::Net::Amazon::S3::HTTPRequest - Create a signed HTTP::Request

=head1 VERSION

version v0.04.0.80

lib/AnyEvent/Net/Amazon/S3/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,
and the same as L<Net::Amazon::S3::HTTPRequest>,
except for its name.

=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


AnyEvent-Net-Curl-Queued

 view release on metacpan or  search on metacpan

eg/Gauge/AnyEvent_Curl_Multi.pm  view on Meta::CPAN

use Any::Moose;
with qw(Gauge::Role);

use AnyEvent;
use AnyEvent::Curl::Multi;
use HTTP::Request::Common qw(GET);
use WWW::Curl::Easy;

sub run {
    my ($self) = @_;

 view all matches for this distribution


AnyEvent-ReverseHTTP

 view release on metacpan or  search on metacpan

eg/proxy.pl  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use warnings;

use HTTP::Request::Common;
use AnyEvent::HTTP;
use AnyEvent::ReverseHTTP;

my $proxy_to = $ARGV[0] or die 'require proxy target';

 view all matches for this distribution


AnyEvent-SlackBot

 view release on metacpan or  search on metacpan

lib/AnyEvent/SlackBot.pm  view on Meta::CPAN

use Moo;
use MooX::Types::MooseLike::Base qw(:all);
use namespace::clean;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Request;
use URI::Escape;
use HTTP::Request::Common qw(POST);
use AnyEvent::HTTP::MultiGet;
use AnyEvent::WebSocket::Client;
use JSON;
use namespace::clean;
use IO::Socket::SSL;

 view all matches for this distribution


AnyEvent-SparkBot

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

use Modern::Perl;
use Moo;
use MooX::Types::MooseLike::Base qw(:all);
use Data::Dumper;
use JSON qw(to_json from_json);
use HTTP::Request::Common qw(POST);
use Ref::Util qw(is_plain_arrayref is_plain_hashref);
use URI::Escape qw(uri_escape_utf8);
use namespace::clean;
use Scalar::Util qw(looks_like_number);
use AnyEvent;

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=cut

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$personId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$personId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$personId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$membershipId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$membershipId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$membershipId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$messageId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$messageId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamMembershipId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamMembershipId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$teamMembershipId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$webhookId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$webhookId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$webhookId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$organizationId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$licenseId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roleId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$eventId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };


=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb=sub {
    my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
      # 0: $self The current AnyEvent::HTTP::Slack object
      # 1: $id the id of the http request
      # 2: Data::Result Object
      # 3: HTTP::Request Object
      # 4: HTTP::Result Object
    };

=back

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  $cb->(@_);
}

=item * my $result=$self->build_post_json($url,$data);

Returns a Data::Result object; When true it contains an HTTP::Request Object For $url, the body will consist of $data converted to json.  When false it contains why it failed.

=cut

sub build_post_json {
  my ($self,$url,$data)=@_;

  my $uri=$self->api_url.$url;
  my $json=eval {to_json($data)};
  return $self->new_false("Failed to convert \$data to json, error was $@") if $@;

  my $request=new HTTP::Request(POST=>$uri,$self->default_headers,$json);
  return $self->new_true($request);
}

=item * my $id=$self->queue_builder($cb,$method,$url,$data);

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  return $self->queue_builder($cb,'build_post_json',$url,$data);
}

=item * my $result=$self->build_put_json($url,$data);

Returns a Data::Result object; When true it contains an HTTP::Request Object For $url, the body will consist of $data converted to json.  When false it contains why it failed.

=cut

sub build_put_json {
  my ($self,$url,$data)=@_;

  my $uri=$self->api_url.$url;
  my $json=eval {to_json($data)};
  return $self->new_false("Failed to convert \$data to json, error was $@") if $@;

  my $request=new HTTP::Request(PUT=>$uri,$self->default_headers,$json);
  return $self->new_true($request);
}

=item * my $id=$self->que_put_json($cb,$url,$data);

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  return $self->queue_builder($cb,'build_put_json',$url,$data);
}

=item * my $result=$self->build_post_form($url,$data);

Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

=cut

sub build_post_form {
  my ($self,$url,$data)=@_;

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  return $self->queue_builder($cb,'build_post_form',$url,$data);
}

=item * my $result=$self->build_get($url,$data);

Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

=cut

sub build_get {
  my ($self,$url,$data)=@_;

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  }
  my $args=join '&',@args;
  $uri .=$args;

  $uri=~ s/\?$//s;
  my $get=new HTTP::Request(GET=>$uri,$self->default_headers);

  return $self->new_true($get);
}

=item * my $self->que_getRaw($cb,$raw_url) 

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN


=cut

sub que_getRaw {
  my ($self,$cb,$url)=@_;
  my $req=HTTP::Request->new(GET=>$url,$self->default_headers);
  return $self->queue_request($req,$cb);
}

=item * my $id=$self->que_get($cb,$url,$data);

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

  return $self->queue_builder($cb,'build_get',$url,$data);
}

=item * my $result=$self->build_head($url,$data);

Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

=cut

sub build_head {
  my ($self,$url,$data)=@_;

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

    push @args,uri_escape_utf8($key).'='.uri_escape_utf8($value);
  }
  my $args=join '&',@args;
  $uri .=$args;

  my $get=new HTTP::Request(HEAD=>$uri,$self->default_headers);

  return $self->new_true($get);
}

=item * my $id=$self->que_head($cb,$url,$data);

lib/AnyEvent/HTTP/Spark.pm  view on Meta::CPAN

    push @args,uri_escape_utf8($key).'='.uri_escape_utf8($value);
  }
  my $args=join '&',@args;
  $uri .=$args;

  my $get=new HTTP::Request(DELETE=>$uri,$self->default_headers);

  return $self->new_true($get);
}

=item * my $id=$self->que_delete($cb,$url,$data);

 view all matches for this distribution


AnyEvent-Twitter

 view release on metacpan or  search on metacpan

lib/AnyEvent/Twitter.pm  view on Meta::CPAN

use URI;
use URI::Escape;
use Digest::SHA;
use Time::Piece;
use AnyEvent::HTTP;
use HTTP::Request::Common 'POST';
use Data::Recursive::Encode;

use Net::OAuth;
use Net::OAuth::ProtectedResourceRequest;
use Net::OAuth::RequestTokenRequest;

 view all matches for this distribution


AnyEvent-UserAgent

 view release on metacpan or  search on metacpan

lib/AnyEvent/UserAgent.pm  view on Meta::CPAN


use Moo;

use AnyEvent::HTTP ();
use HTTP::Cookies ();
use HTTP::Request ();
use HTTP::Request::Common ();
use HTTP::Response ();

use namespace::clean;

our $VERSION = '0.09';

lib/AnyEvent/UserAgent.pm  view on Meta::CPAN

	$self->_request($req, \%opts, sub {
		$self->_response($req, @_, $cb);
	});
}

sub get    { _do_request(\&HTTP::Request::Common::GET    => @_) }
sub head   { _do_request(\&HTTP::Request::Common::HEAD   => @_) }
sub put    { _do_request(\&HTTP::Request::Common::PUT    => @_) }
sub delete { _do_request(\&HTTP::Request::Common::DELETE => @_) }
sub post   { _do_request(\&HTTP::Request::Common::POST   => @_) }
sub patch   { _do_request(\&HTTP::Request::Common::PATCH   => @_) }
sub options   { _do_request(\&HTTP::Request::Common::OPTIONS   => @_) }

sub _do_request {
	my $cb   = pop();
	my $meth = shift();
	my $self = shift();

lib/AnyEvent/UserAgent.pm  view on Meta::CPAN

=head2 request

    $ua->request(GET 'http://example.com/', sub { print($_[0]->code) });

This method will dispatch the given request object. Normally this will be an
instance of the L<HTTP::Request> class, but any object with a similar interface
will do. The last argument must be a callback that will be called with a
response object as first argument. Response will be an instance of the
L<HTTP::Response> class.

This method is a wrapper for the L<C<AnyEvent::HTTP::http_request()>|AnyEvent::HTTP>

lib/AnyEvent/UserAgent.pm  view on Meta::CPAN

=head2 get

    $ua->get('http://example.com/', sub { print($_[0]->code) });

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::GET()>|HTTP::Request::Common/GET $url> function.
The last argument must be a callback.

=head2 head

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::HEAD()>|HTTP::Request::Common/HEAD $url> function.
See L<C<get()>|/get>.

=head2 put

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::PUT()>|HTTP::Request::Common/PUT $url> function.
See L<C<get()>|/get>.

=head2 delete

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::DELETE()>|HTTP::Request::Common/DELETE $url>
function. See L<C<get()>|/get>.

=head2 post

    $ua->post('http://example.com/', [key => 'value'], sub { print($_[0]->code) });

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::POST()>|HTTP::Request::Common/POST $url> function.
The last argument must be a callback.

=head2 patch

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::PATCH()>|HTTP::Request::Common/PATCH $url> function.
The last argument must be a callback.

=head2 options

This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::OPTIONS()>|HTTP::Request::Common/OPTIONS $url>
function. The last argument must be a callback.

=head1 LIMITATIONS

Because of the handling of redirections done by this module as well as

lib/AnyEvent/UserAgent.pm  view on Meta::CPAN

C<persistent => 0> option to the C<AnyEvent::UserAgent> constructor otherwise
some requests might fail.

=head1 SEE ALSO

L<AnyEvent::HTTP>, L<HTTP::Cookies>, L<HTTP::Request::Common>, L<HTTP::Request>,
L<HTTP::Response>.

=head1 SUPPORT

=over 4

 view all matches for this distribution


AnyEvent-WebService-ImKayac

 view release on metacpan or  search on metacpan

lib/AnyEvent/WebService/ImKayac.pm  view on Meta::CPAN


our $VERSION = '0.01';
our $URL = "http://im.kayac.com";

use AnyEvent::HTTP;
use HTTP::Request::Common;
use Digest::SHA qw/sha1_hex/;
use JSON;
use Carp;

=head1 NAME

 view all matches for this distribution


( run in 1.126 second using v1.01-cache-2.11-cpan-4505f990765 )