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


Astro-SpaceTrack

 view release on metacpan or  search on metacpan

inc/Mock/LWP/UserAgent.pm  view on Meta::CPAN

use warnings;

use Carp;
use Errno qw{ ENOENT };
use File::Spec;
use HTTP::Request;
use HTTP::Response;
use LWP::UserAgent;
use JSON;

our $VERSION = '0.171';

inc/Mock/LWP/UserAgent.pm  view on Meta::CPAN

	return;
    };

    *LWP::UserAgent::get = sub {
	my ( $self, $url ) = @_;
	return $self->request( HTTP::Request->new( GET => $url ) );
    };

    *LWP::UserAgent::head = sub {
	my ( $self, $url ) = @_;
	return $self->request( HTTP::Request->new( HEAD => $url ) );
    };

    *LWP::UserAgent::post = sub {
	my ( $self, $url ) = @_;
	return $self->request( HTTP::Request->new( POST => $url ) );
    };

    *LWP::UserAgent::put = sub {
	my ( $self, $url ) = @_;
	return $self->request( HTTP::Request->new( PUT => $url ) );
    };

    *LWP::UserAgent::request = sub {
	my ( $self, $rqst ) = @_;
	my $method = $rqst->method();

inc/Mock/LWP/UserAgent.pm  view on Meta::CPAN

=head3 request

 my $resp = $ua->request( $rqst );

This method returns the response for the given
L<HTTP::Request|HTTP::Request> object from the data loaded by
L<__load_data()|/__load_data>. If the given URL and method are not
found, the response is a 404 error.

=head1 ATTRIBUTES

 view all matches for this distribution


Atompub

 view release on metacpan or  search on metacpan

lib/Atompub.pm  view on Meta::CPAN


use 5.006;
use version 0.74; our $VERSION = qv('0.3.7');

use HTTP::Headers;
use HTTP::Request;
use HTTP::Response;
use XML::Atom;
use XML::Atom::Service 0.15.4;

our %REQUEST_HEADERS = (

lib/Atompub.pm  view on Meta::CPAN


while (my($method, $header) = each %REQUEST_HEADERS) {
    no strict 'refs'; ## no critic
    *{"HTTP::Headers::$method"} = sub { shift->header($header, @_) }
        unless HTTP::Headers->can($method);
    *{"HTTP::Request::$method"} = sub { shift->header($header, @_)}
        unless (HTTP::Request->can($method));
}

while (my($method, $header) = each %RESPONSE_HEADERS) {
    no strict 'refs'; ## no critic
    *{"HTTP::Headers::$method"} = sub { shift->header($header, @_) }

lib/Atompub.pm  view on Meta::CPAN


while (my($method, $header) = each %ENTITY_HEADERS) {
    no strict 'refs'; ## no critic
    *{"HTTP::Headers::$method"} = sub { shift->header($header, @_) }
        unless HTTP::Headers->can($method);
    *{"HTTP::Request::$method"} = sub { shift->header($header, @_) }
        unless HTTP::Request->can($method);
    *{"HTTP::Response::$method"} = sub { shift->header($header, @_) }
        unless HTTP::Response->can($method);
}

1; # Magic true value required at end of module

lib/Atompub.pm  view on Meta::CPAN

and interoperated with other implementations.
See L<http://intertwingly.net/wiki/pie/July2007InteropTokyo> and
L<http://www.intertwingly.net/wiki/pie/November2007Interop> in detail.


=head1 METHODS of HTTP::Headers, HTTP::Request, and HTTP::Response

Some accessors for the HTTP header fields, which are used in the Atom Publishing Protocol,
are imported into L<HTTP::Headers>, L<HTTP::Request>, and L<HTTP::Response>.
See L<http://www.ietf.org/rfc/rfc2616.txt> in detail.


=head2 $headers->accept([ $value ])

An accessor for the I<Accept> header field.

This method is imported into L<HTTP::Headers> and L<HTTP::Request>.

=head2 $headers->if_match([ $value ])

An accessor for the I<If-Match> header field.

This method is imported into L<HTTP::Headers> and L<HTTP::Request>.

=head2 $headers->if_none_match([ $value ])

An accessor for the I<If-None-Match> header field.

This method is imported into L<HTTP::Headers> and L<HTTP::Request>.

=head2 $headers->if_modified_since([ $value ])

An accessor for the I<If-Modified-Since> header field.
$value MUST be UTC epoch value, like C<1167609600>.

This method is imported into L<HTTP::Headers> and L<HTTP::Request>.

=head2 $headers->if_unmodified_since([ $value ])

An accessor for the I<If-Unmodified-Since> header field.
$value MUST be UTC epoch value, like C<1167609600>.

This method is imported into L<HTTP::Headers> and L<HTTP::Request>.

=head2 $headers->content_location([ $value ])

An accessor for the I<Content-Location> header field.

lib/Atompub.pm  view on Meta::CPAN


=head2 $headers->last_modified([ $value ])

An accessor for the I<Last-Modified> header field.

This method is imported into L<HTTP::Headers>, L<HTTP::Request>, and L<HTTP::Response>.

=head2 $headers->slug([ $value ])

An accessor for the I<Slug> header field.

This method is imported into L<HTTP::Headers>, L<HTTP::Request>, and L<HTTP::Response>.


=head1 AUTHOR

Takeru INOUE, E<lt>takeru.inoue _ gmail.comE<gt>

 view all matches for this distribution


Attean

 view release on metacpan or  search on metacpan

lib/Attean/SPARQLClient.pm  view on Meta::CPAN

	has 'user_agent' => (is => 'rw', isa => InstanceOf['LWP::UserAgent'], default => sub { my $ua = LWP::UserAgent->new(); $ua->agent("Attean/$Attean::VERSION " . $ua->_agent); $ua });
	has 'request_signer' => (is => 'rw');

=item C<< query_request( $sparql ) >>

Returns an HTTP::Request object for the given SPARQL query string.

=cut

	sub query_request {
		my $self	= shift;

lib/Attean/SPARQLClient.pm  view on Meta::CPAN

		my $uri			= URI->new($endpoint);
		my %params		= $uri->query_form;
		$params{'query'} = $sparql;
		$uri->query_form(%params);
		my $url			= $uri->as_string;
		my $req			= HTTP::Request->new('GET', $url);
		if (my $signer = $self->request_signer) {
			$signer->sign($req);
		}
		return $req;
	}

 view all matches for this distribution


Atto

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "warnings" : "0"
         }
      },
      "test" : {
         "requires" : {
            "HTTP::Request::Common" : "0",
            "Plack::Test" : "0",
            "Test::More" : "0",
            "utf8" : "0"
         }
      }

 view all matches for this distribution


Audio-Scrobbler

 view release on metacpan or  search on metacpan

lib/Audio/Scrobbler.pm  view on Meta::CPAN

		print "RDBG faking it...\n" if $self->{'cfg'}{'verbose'};
		$self->{'md5ch'} = 'furrfu';
		$self->{'nexturl'} = 'http://furrfu.furrblah/furrquux';
		return 1;
	}
	$req = new HTTP::Request('GET', "http://post.audioscrobbler.com/?$s");
	if (!$req) {
		$self->err('Could not create the handshake request object');
		return undef;
	}
	$resp = $ua->request($req);

lib/Audio/Scrobbler.pm  view on Meta::CPAN

	# Let's hope md5_hex() always returns lowercase hex stuff
	$md5resp = md5_hex(
	    md5_hex($self->{'cfg'}{'password'}).$self->{'md5ch'});

	# Let's roll?
	$req = HTTP::Request->new('POST', $self->{'nexturl'});
	if (!$req) {
		$self->err('Could not create the submission request object');
		return undef;
	}
	$req->content_type('application/x-www-form-urlencoded; charset="UTF-8"');

 view all matches for this distribution


Auth-Yubikey_WebClient

 view release on metacpan or  search on metacpan

lib/Auth/Yubikey_WebClient.pm  view on Meta::CPAN

	$self->{params} .= '&h=' . uri_escape(encode_base64(hmac_sha1($self->{params}, decode_base64($self->{api})), ''));

	# pass the request to yubico
	my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => $self->{verify_hostname} });
	$ua->env_proxy();	# 4.02
	my $req = HTTP::Request->new(GET => $self->{url} . "?$self->{params}");
	my $res = $ua->request($req);
	if($res->is_success) {
		$self->{response} = $res->content;
	} else {
		print $res->status_line . "\n";

 view all matches for this distribution


Authen-CAS-UserAgent

 view release on metacpan or  search on metacpan

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

		ERROR_PROXY_INVALIDTICKET
		ERROR_PROXY_UNKNOWN
	}],
);

use HTTP::Request;
use HTTP::Request::Common ();
use HTTP::Status ();
use URI;
use URI::Escape qw{uri_escape};
use URI::QueryParam;
use XML::LibXML;

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

	# find any additional required login params (i.e. lt, execution, and _eventId)
	if(@{$h->{'config'}->{'param_heuristics'}}) {
		# retrieve the login form that will be parsed by configured param_heuristics
		my $formUri = $loginUri->clone();
		$formUri->query_param('service', $service);
		my $response = $ua->simple_request(HTTP::Request::Common::GET($formUri));

		# process all configured param heuristics
		foreach (@{$h->{'config'}->{'param_heuristics'}}) {
			# skip invalid heuristics
			next if(ref($_) ne 'CODE');

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

			@params = $_->($service, $response, $ua, $h, @params);
		}
	}

	# issue the login request
	my $response = $ua->simple_request(HTTP::Request::Common::POST($loginUri, \@params));

	#short-circuit if there is no response from CAS for some reason
	return if(!$response);

	#process all the ticket heuristics until a ticket is found

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

		'pgt'           => $h->{'pgt'},
		'targetService' => $service,
	);

	# fetch proxy ticket and parse response xml
	my $response = $ua->simple_request(HTTP::Request::Common::GET($ptUri));
	my $doc = eval {XML::LibXML->new()->parse_string($response->decoded_content('charset' => 'none'))};
	if($@ || !$doc) {
		$h->{'error'} = ERROR_PROXY_INVALIDRESPONSE;
		push @{$h->{'errors'}}, $h->{'error'};
		return;

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

my $restLoginCallback = sub {
	my ($service, $ua, $h) = @_;

	#retrieve the tgt
	my $loginUri = URI->new_abs('v1/tickets', $h->{'casServer'});
	my $tgtResponse = $ua->simple_request(HTTP::Request::Common::POST($loginUri, [
		'username' => $h->{'username'},
		'password' => $h->{'password'},
	]));
	return if($tgtResponse->code != 201);
	my $tgtUri = $tgtResponse->header('Location');

	#retrieve a ticket for the requested service
	my $ticketResponse = $ua->simple_request(HTTP::Request::Common::POST($tgtUri, [
		'service' => $service,
	]));
	return if($ticketResponse->code != 200);
	return $ticketResponse->decoded_content;
};

 view all matches for this distribution


Authen-Credential

 view release on metacpan or  search on metacpan

lib/Authen/Credential.pm  view on Meta::CPAN


  use Authen::Credential;
  use Authen::Credential::plain;
  use Getopt::Long qw(GetOptions);
  use Config::General qw(ParseConfig);
  use HTTP::Request;

  # creation
  $cred = Authen::Credential->new(
      scheme => "plain",
      name   => "system",

lib/Authen/Credential.pm  view on Meta::CPAN

  if ($cred->scheme() eq "plain") {
      printf("user name is %s\n", $cred->name());
  }

  # use the prepare() method to get ready-to-use data
  $req = HTTP::Request->new(GET => $url);
  $req->header(Authorization => $cred->prepare("HTTP.Basic"));

=head1 DESCRIPTION

This module offers abstractions of credentials, i.e. something that

 view all matches for this distribution


Authen-GoogleAccount

 view release on metacpan or  search on metacpan

lib/Authen/GoogleAccount.pm  view on Meta::CPAN




use URI::Escape;
use LWP::UserAgent;
use HTTP::Request;
use Data::Dumper;
#use Smart::Comments;
use base qw(Class::Accessor::Fast);

__PACKAGE__->mk_accessors( qw/session_token base_key enable_session errstr name email/ );

lib/Authen/GoogleAccount.pm  view on Meta::CPAN


sub post_item {
	my $self = shift;
	
	my $ua = LWP::UserAgent->new();
	my $req = HTTP::Request->new(
		'POST',
		'http://www.google.com/base/feeds/items/',
	);
	$req->header('Authorization' => 'AuthSub token="' . $self->session_token . '"');
	$req->header('X-Google-Key' => "key=" . $self->base_key);

lib/Authen/GoogleAccount.pm  view on Meta::CPAN

sub delete_item {
	my $self = shift;
	my $item = shift;
	
	my $ua = LWP::UserAgent->new();
	my $req = HTTP::Request->new(
		'DELETE',
		'http://www.google.com/base/feeds/items/' . $item,
	);
	$req->header('Authorization' => 'AuthSub token="' . $self->session_token . '"');
	$req->header('X-Google-Key' => "key=" . $self->base_key);

 view all matches for this distribution


Authen-HTTP-Signature

 view release on metacpan or  search on metacpan

lib/Authen/HTTP/Signature.pm  view on Meta::CPAN

Create signatures:

    use 5.010;
    use Authen::HTTP::Signature;
    use File::Slurp qw(read_file);
    use HTTP::Request::Common;

    my $key_string = read_file("/my/priv/key.pem") or die $!;

    my $signer = Authen::HTTP::Signature->new(
        key => $key_string,

lib/Authen/HTTP/Signature.pm  view on Meta::CPAN


Validate signatures:

    use 5.010;
    use Authen::HTTP::Signature::Parser;
    use HTTP::Request::Common;
    use File::Slurp qw(read_file);
    use Try::Tiny;

    my $req = POST('http://example.com/foo?param=value&pet=dog',
            Content_Type => 'application/json',

 view all matches for this distribution


AxKit2

 view release on metacpan or  search on metacpan

lib/AxKit2/Test.pm  view on Meta::CPAN

}

sub http_get {
    my ($url) = @_;
    $url = "http://localhost:$server_port$url" if $url !~ m/^[a-z0-9]{1,6}:/i;
    my $req = new HTTP::Request(GET => $url);
    return ($req, $ua->request($req));
}

sub plan {
    my $builder = __PACKAGE__->builder;

 view all matches for this distribution


Azure-Storage-Blob-Client

 view release on metacpan or  search on metacpan

lib/Azure/Storage/Blob/Client/Caller.pm  view on Meta::CPAN

package Azure::Storage::Blob::Client::Caller;
use Moose;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Tiny;
use HTTP::Request;
use HTTP::Headers;
use HTTP::Date;
use Digest::SHA qw(hmac_sha256_base64);
use MIME::Base64;
use Encode;

lib/Azure/Storage/Blob/Client/Caller.pm  view on Meta::CPAN

    ? sprintf("%s&%s", $call_object->endpoint, $url_encoded_parameters)
    : $call_object->endpoint;

  my $body = $self->_build_body_content($call_object);
  my $headers = $self->_build_headers($call_object, $body);
  my $request = HTTP::Request->new($call_object->method, $url, $headers, $body);
  $self->_sign_request($request, $account_name, $account_key, $call_object);

  return $request;
}

 view all matches for this distribution


BZFlag-Info

 view release on metacpan or  search on metacpan

Info.pm  view on Meta::CPAN

    my $ua = new LWP::UserAgent;
    $ua->proxy('http', $proxy) if defined($proxy);
    
    $ua->timeout(10);
    
    my $req = HTTP::Request->new('GET', ($options{Server} ? $options{Server} : $self->listserver));
    my $res = $ua->request($req);
    my $totalServers = 0;
    my $totalPlayers = 0;
    for my $line (split("\n",$res->content)) {
	my ($serverport, $version, $flags, $ip, $description) = split(" ",$line,5);

 view all matches for this distribution


Bank-Holidays

 view release on metacpan or  search on metacpan

lib/Bank/Holidays.pm  view on Meta::CPAN

    close $fh;
  }
  else {
    my $url = 'http://www.federalreserve.gov/aboutthefed/k8.htm';

    my $request = HTTP::Request->new( 'GET', $url );

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

    $content = $response->content();

 view all matches for this distribution


Bash-Completion-Plugins-cpanm

 view release on metacpan or  search on metacpan

lib/Bash/Completion/Plugins/cpanm.pm  view on Meta::CPAN

# ABSTRACT: Bash completion for cpanm and cpanf
use strict;
use warnings;
use base 'Bash::Completion::Plugin';

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

use Bash::Completion::Utils qw( command_in_path );

 view all matches for this distribution


Bayonne-Server

 view release on metacpan or  search on metacpan

lib/Bayonne/Server.pm  view on Meta::CPAN

	if(index($host, ":") < 1) {
		$host .= ":8055";};
	
	my $reply = undef;
	my $document = "http://" . $host . "/" . $query;
	my $request = new HTTP::Request 'GET', $document;
	if($secret) {
		$request->authorization_basic($user, $secret);};
	my $response = $session->request($request);
	my $parser = XML::Simple->new();

 view all matches for this distribution


Bb-Collaborate-V3

 view release on metacpan or  search on metacpan

t/soap-connect-lwp.t  view on Meta::CPAN

use Test::Fatal;

use Bb::Collaborate::V3;
use t::Bb::Collaborate::V3;

for (qw(LWP::UserAgent HTTP::Request::Common)) {
    eval "use $_";
    plan skip_all => "$_ required for lwp level testing" if $@;
}

SKIP: {

t/soap-connect-lwp.t  view on Meta::CPAN

    $message =~ s/\$\{user\}/$user/g;
    $message =~ s/\$\{pass\}\E/$pass/g;

    is ( exception {
	$response = $userAgent
	    ->request(HTTP::Request::Common::POST( $connection->url,
		      Authorization => $connection->_authoriz,
		      Content_Type => 'text/xml;charset=UTF-8',
		      Content => $message))
		  } => undef, "uploadMultimediaContent request post - lives"); 

 view all matches for this distribution


Bib-CrossRef

 view release on metacpan or  search on metacpan

lib/Bib/CrossRef.pm  view on Meta::CPAN

  $cites_clean =~ s/\s+/+/g; #$cites_clean = uri_escape_utf8($cites_clean);
  #print $cites_clean;
  # crossref like us to give a mailto email when making request so they can get in touch if the script is generating errors,
  # feel free to change the email address here to something more appropriate
  # change to using /works API instead of /dois API
  my $req = HTTP::Request->new(GET => 'https://api.crossref.org/works?mailto=doug@leith.ie&rows=1&query='.$cites_clean);
  my $ua = LWP::UserAgent->new;
  my $res = $ua->request($req);
  if ($res->is_success) {
    # extract json response
    my $json = decode_json($res->decoded_content);

lib/Bib/CrossRef.pm  view on Meta::CPAN


sub parse_doi {
  # given a DOI, use unixref interface to convert into a full citation
  my ($self, $doi) = @_;
  
  my $req = HTTP::Request->new(GET =>'http://dx.doi.org/'.$doi,['Accept' =>'application/vnd.crossref.unixsd+xml']);
  my $ua = LWP::UserAgent->new;
  my $res = $ua->request($req);
  if ($res->is_success) {
    # now parse the xml
    my $xs = XML::Simple->new();

 view all matches for this distribution


Bib-Tools

 view release on metacpan or  search on metacpan

lib/Bib/Tools.pm  view on Meta::CPAN

  
  my $self = shift @_;
  my $url = shift @_;
  my $ua = LWP::UserAgent->new;
  $ua->agent('Mozilla/5.0');
  my $req = HTTP::Request->new(GET => $url);
  my $res = $ua->request($req);
  if ($res->is_success) {
    my $tree= HTML::TreeBuilder::XPath->new;
    $tree->parse($res->decoded_content);
    my @atitles=$tree->findvalues('//tr[@class="gsc_a_tr"]/td/a[@class="gsc_a_at"]');

lib/Bib/Tools.pm  view on Meta::CPAN


  my $self = shift @_;
  my $url = shift @_;
  my $ua = LWP::UserAgent->new;
  $ua->agent('Mozilla/5.0');
  my $req = HTTP::Request->new(GET => $url);
  my $res = $ua->request($req);
  if ($res->is_success) {
    my $tree= HTML::TreeBuilder::XPath->new;
    $tree->parse($res->decoded_content);
    my @atitles=$tree->findvalues('//div[@class="gs_ri"]/h3/a');

lib/Bib/Tools.pm  view on Meta::CPAN

  my $url = shift @_;
  my $maxnum = shift @_; if (!defined($maxnum)) {$maxnum=-1;}
  
  my $ua = LWP::UserAgent->new;
  $ua->agent('Mozilla/5.0');
  my $req = HTTP::Request->new(GET => $url);
  my $res = $ua->request($req);
  if ($res->is_success) {
    my $xs = XML::Simple->new();
    my $data = $xs->XMLin($res->decoded_content);
    my @cites; my @ctemp;

lib/Bib/Tools.pm  view on Meta::CPAN

  # get paper details from orcid using API
  
  my $self = shift @_; my $orcid_id = shift @_;
  
  my $ua = LWP::UserAgent->new;
  my $req = HTTP::Request->new(GET => "http://pub.orcid.org/$orcid_id/orcid-works/");
  my $res = $ua->request($req);
  if ($res->is_success) {
    my $xs = XML::Simple->new();
    # the orcid response is utf8 xml
    my $data = $xs->XMLin($res->decoded_content);

lib/Bib/Tools.pm  view on Meta::CPAN

  # add results from a pubmed query
  my ($self,$q) = @_;

  my $ua = LWP::UserAgent->new;
  $q =~ s/\s+/+/g;
  my $req = HTTP::Request->new(GET => "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?usehistory=y&db=pubmed&term=".$q);
  my $res = $ua->request($req);
  if ($res->is_success) {
    my $web = $1 if ($res->decoded_content =~ /<WebEnv>(\S+)<\/WebEnv>/);
    my $key = $1 if ($res->decoded_content =~ /<QueryKey>(\d+)<\/QueryKey>/);
    $req = HTTP::Request->new(GET => "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&query_key=$key&WebEnv=$web");
    $res = $ua->request($req);
    if ($res->is_success) {
      my $xs = XML::Simple->new();
      my $data = $xs->XMLin($res->decoded_content);
      my @cites = $data->{'DocSum'};

 view all matches for this distribution


Biblio-Refbase

 view release on metacpan or  search on metacpan

lib/Biblio/Refbase.pm  view on Meta::CPAN

our $VERSION = '0.04';

$VERSION = eval $VERSION;

use Carp;
use HTTP::Request::Common;
use HTTP::Status ':constants';
use LWP::UserAgent;
use URI;
use URI::QueryParam;

 view all matches for this distribution


Bigtop

 view release on metacpan or  search on metacpan

docs/keyword_cookbook/RPCSoap/Kids/testclient  view on Meta::CPAN

EO_XML

my $ua = LWP::UserAgent->new();
$ua->agent( 'BigtopTestClient/1.0' );

my $request = HTTP::Request->new(
    POST => 'http://localhost:8080/soap'
);

$request->content_type( 'text/xml; charset=utf-8' );
$request->header( 'Host' => 'localhost' );

 view all matches for this distribution


Bing-Translate

 view release on metacpan or  search on metacpan

lib/Bing/Translate.pm  view on Meta::CPAN

use HTTP::Headers;
use URI::Escape;
# for getToken
use JSON;
use Data::Dumper;
use HTTP::Request::Common qw(POST);

#http://stackoverflow.com/questions/392135/what-exactly-does-perls-bless-do
#http://www.tutorialspoint.com/perl/perl_oo_perl.htm
sub new {
        my $class = shift;

lib/Bing/Translate.pm  view on Meta::CPAN

        $text = uri_escape($text);

        my $apiuri = "http://api.microsofttranslator.com/v2/Http.svc/Translate?"."text=".$text."&from=$from"."&to=$to"."&contentType=text/plain";
        my $agent_name='myagent';
        my $ua = LWP::UserAgent->new($agent_name);
        my $request = HTTP::Request->new(GET=>$apiuri);
        my $authToken = &getToken;
        #$request->header(Accept=>'text/html');
        $request->header(Authorization=>$authToken);

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

 view all matches for this distribution


Bio-DB-BioFetch

 view release on metacpan or  search on metacpan

lib/Bio/DB/BioFetch.pm  view on Meta::CPAN

$Bio::DB::BioFetch::VERSION = '1.7.3';
use strict;

use Carp;

use HTTP::Request::Common 'POST';

=head1 NAME

Bio::DB::BioFetch - Database object interface to BioFetch retrieval

lib/Bio/DB/BioFetch.pm  view on Meta::CPAN


=head2 get_request

 Title   : get_request
 Usage   : my $url = $self->get_request
 Function: returns a HTTP::Request object
 Returns :
 Args    : %qualifiers = a hash of qualifiers (ids, format, etc)

=cut

 view all matches for this distribution


Bio-DB-EMBL

 view release on metacpan or  search on metacpan

t/EMBL.t  view on Meta::CPAN

    use Test::RequiresInternet;

    # test_begin(-tests => 16,
    #            -requires_modules    => [qw(IO::String
    #                                        LWP::UserAgent
    #                                        HTTP::Request::Common)],
    #            -requires_networking => 1);
    use_ok('Bio::DB::EMBL');
}

my $verbose = $ENV{'BIOPERLDEBUG'};

 view all matches for this distribution


Bio-DB-NCBIHelper

 view release on metacpan or  search on metacpan

lib/Bio/DB/EntrezGene.pm  view on Meta::CPAN


=head2 get_request

 Title   : get_request
 Usage   : my $url = $self->get_request
 Function: HTTP::Request
 Returns : 
 Args    : %qualifiers = a hash of qualifiers (ids, format, etc)

=head2 get_Stream_by_id

 view all matches for this distribution


Bio-DB-RefSeq

 view release on metacpan or  search on metacpan

t/RefSeq.t  view on Meta::CPAN


use strict;
use warnings;

use Test::More;
use Test::Needs qw(LWP::UserAgent HTTP::Request::Common Data::Stag);
use Test::RequiresInternet;

use Bio::DB::RefSeq;

my $verbose = $ENV{'BIOPERLDEBUG'} || -1;

 view all matches for this distribution


Bio-DB-SwissProt

 view release on metacpan or  search on metacpan

lib/Bio/DB/SwissProt.pm  view on Meta::CPAN


package Bio::DB::SwissProt;
$Bio::DB::SwissProt::VERSION = '1.7.4';
use strict;

use HTTP::Request::Common;
our $MODVERSION = '0.8.1';

use base qw(Bio::DB::WebDBSeqI);

# global vars

lib/Bio/DB/SwissProt.pm  view on Meta::CPAN


=head2 get_request

 Title   : get_request
 Usage   : my $url = $self->get_request
 Function: returns a HTTP::Request object
 Returns :
 Args    : %qualifiers = a hash of qualifiers (ids, format, etc)

=cut

lib/Bio/DB/SwissProt.pm  view on Meta::CPAN

    my $uid;
    my $jointype = $HOSTS{$self->servertype}->{'jointype'} || ' ';
    my $idvar = $HOSTS{$self->servertype}->{'idvar'} || 'id';

    if( ref($uids) =~ /ARRAY/i ) {
	# HTTP::Request automagically converts the ' ' to %20
	$uid = join($jointype, @$uids);
    } else {
	$uid = $uids;
    }
    $vars{$idvar} = $uid;

 view all matches for this distribution


Bio-Das-Lite

 view release on metacpan or  search on metacpan

t/21-proxy.t  view on Meta::CPAN

      Port         => $listen_port,
      ClientFilter => 'POE::Filter::HTTPD',
      ClientInput  => sub {
        my ($kernel, $heap, $req_or_resp) = @_[KERNEL, HEAP, ARG0];
        # Errors appear as HTTP::Response objects (via filter)
        if ($req_or_resp->isa(q[HTTP::Request])) {
          my $auth = $req_or_resp->proxy_authorization_basic;
          $req_or_resp = HTTP::Response->new(200, $auth ? 'PROXY ' . $auth : 'PROXY'); # OK
          $req_or_resp->content('FAKE CONTENT');
        }
        $heap->{client}->put($req_or_resp);

 view all matches for this distribution


Bio-Das-ProServer

 view release on metacpan or  search on metacpan

lib/Bio/Das/ProServer.pm  view on Meta::CPAN

package Bio::Das::ProServer;
use warnings;
use strict;
use Bio::Das::ProServer::Config;
use CGI qw(:cgi);
use HTTP::Request;
use HTTP::Response;
use Compress::Zlib;
use Getopt::Long;
use POE;                         # Base features.
use POE::Filter::HTTPD;          # For serving HTTP content.

lib/Bio/Das/ProServer.pm  view on Meta::CPAN


=head1 DEPENDENCIES

Bio::Das::ProServer::Config
CGI :cgi
HTTP::Request
HTTP::Response
Compress::Zlib
Getopt::Long
POE
POE::Filter::HTTPD

 view all matches for this distribution


Bio-Das

 view release on metacpan or  search on metacpan

Das/HTTP/Fetch.pm  view on Meta::CPAN

$VERSION = '1.11';
my $ERROR = '';   # for errors that occur before we create the object

use constant READ_UNIT => 1024 * 5;  # 5K read units

=item $fetcher = Bio::Das::HTTP::Request->new(@args)

Create a new fetcher object.  At the time the object is created, it
will attempt to establish a non-blocking connection with the remote
server.  This means that the call to new() may be returned before the
connection is established.

 view all matches for this distribution


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