view release on metacpan or search on metacpan
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
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
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
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
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
view release on metacpan or search on metacpan
lib/Bio/DB/EUtilities.pm view on Meta::CPAN
=head2 get_Response
Title : get_Response
Usage : $agent->get_Response;
Function: Get the HTTP::Response object by passing it an HTTP::Request (generated from
Bio::ParameterBaseI implementation).
Returns : HTTP::Response object or data if callback is used
Args : (optional)
-cache_response - flag to cache HTTP::Response object;
view all matches for this distribution
view release on metacpan or search on metacpan
GMOD/Adaptor.pm view on Meta::CPAN
# This should be converted to XML
if ($adaptor->defaults_cgi) {
my $ua = LWP::UserAgent->new();
my $version = $self->biogmod_version;
$ua->agent("Bio::GMOD.pm/$version");
my $request = HTTP::Request->new('GET',$adaptor->defaults_cgi);
my $response = $ua->request($request);
if ($response->is_success) {
# Parse out the content and store the defaults in the object
my $content = $response->content;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Glite.pm view on Meta::CPAN
$i ++;
}
}
my $url = $prefix . join('/', $gb->{filename}, $method[-1], @new_args);
my $request = HTTP::Request->new('GET', $url);
my $res = $ua->simple_request($request);
my $result;
if($res->is_redirect){
$result = $res->header('Location');
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/get_abundance_profile view on Meta::CPAN
use strict ;
use warnings;
use JSON;
use Getopt::Long;
use LWP::UserAgent ;
use HTTP::Request::Common;
use Bio::KBase;
use Data::Dumper;
scripts/get_abundance_profile view on Meta::CPAN
# Create a request
my $base_url = "http://dev.metagenomics.anl.gov/api.cgi/" ;
#my $base_url = "http://dunkirk.mcs.anl.gov/~tharriso/mgrast/api.cgi/";
my $url = $base_url . "abundance_profile/".$mgid."?format=".$format."&type=".$type."&source=".$source;
my $req = HTTP::Request->new(GET => "$url");
my $res = $ua->request($req);
if ($res->is_success){
if ($res->header('Content-Type') eq "application/json") {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/MLST/DatabaseSettings.pm view on Meta::CPAN
$Bio::MLST::DatabaseSettings::VERSION = '2.1.1706216';
use Moose;
use XML::LibXML;
use LWP::UserAgent;
use HTTP::Request;
has 'filename' => ( is => 'ro', isa => 'Str', required => 1 );
sub generate_dom
{
lib/Bio/MLST/DatabaseSettings.pm view on Meta::CPAN
my $ua = LWP::UserAgent->new;
if(defined($ENV{HTTPS_PROXY}))
{
$ua->proxy( [ 'http', 'https' ], $ENV{HTTPS_PROXY} );
}
my $req = HTTP::Request->new( GET => $location );
my $res = $ua->request($req);
$res->is_success or die "Could not connect to $location\n";
XML::LibXML->load_xml( string => $res->content );
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/export-itol.pl view on Meta::CPAN
use Getopt::Euclid qw(:vars);
use Smart::Comments '###';
use Config::Any;
use HTTP::Request::Common;
use LWP::UserAgent;
use Bio::MUST::Core;
use Bio::MUST::Core::Constants qw(:files);
use Bio::MUST::Core::Utils qw(change_suffix insert_suffix);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/PrimerDesigner/Remote.pm view on Meta::CPAN
=cut
use strict;
use warnings;
use HTTP::Request;
use LWP::UserAgent;
use Readonly;
Readonly our
$VERSION => sprintf "%s", q$Revision: 24 $ =~ /(\d+)/;
lib/Bio/PrimerDesigner/Remote.pm view on Meta::CPAN
#
unless ( $self->check( $url, $ua, $program ) ) {
return $self->error("$url did not return expected result");
}
my $request = HTTP::Request->new('POST', $url);
#
# string-ify the config hash to pass to the CGI
#
my @content = ();
lib/Bio/PrimerDesigner/Remote.pm view on Meta::CPAN
my $self = shift;
my ($url, $ua, $program) = @_;
my $content = "check=" . $program;
my $request = HTTP::Request->new( 'POST', $url );
$request->content( $content );
my $response = $ua->request( $request );
return $self->error("No reponse from host $url")
unless $response;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Perl.pm view on Meta::CPAN
my $refseq_db = undef;
sub get_sequence{
my ($db_type,$identifier) = @_;
if( ! $DBOKAY ) {
confess ("Your system does not have one of LWP, HTTP::Request::Common, IO::String\n".
"installed so the DB retrieval method is not available.\n".
"Full error message is:\n $!\n");
return;
}
$db_type = lc($db_type);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Tools/Run/RemoteBlast.pm view on Meta::CPAN
use Bio::SeqIO;
use IO::String;
use Bio::SearchIO;
use LWP;
use HTTP::Request::Common;
use Bio::Root::Version;
use constant {
NOT_FINISHED => 0,
ERR_QBSTATUS => 1,
lib/Bio/Tools/Run/RemoteBlast.pm view on Meta::CPAN
my($self, $rid) = @_;
my $url_base = $self->get_url_base;
my %hdr = %RETRIEVALHEADER;
$hdr{'RID'} = $rid;
my $req = HTTP::Request->new(
GET => $url_base."?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid",
);
#$self->debug("SearchInfo request is " . $req->as_string());
my $response = $self->ua->request($req);
if( $response->is_success ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/WebService/LANL/SequenceLocator.pm view on Meta::CPAN
use Moo;
use Data::Dumper;
use HTML::LinkExtor;
use HTML::TableExtract;
use HTML::TokeParser;
use HTTP::Request::Common;
use List::AllUtils qw< pairwise part min max >;
our $VERSION = 20170324;
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/biosql/terms/importrelation.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use URI;
use LWP::UserAgent;
use HTTP::Request;
use XML::LibXML;
use File::Temp qw(tempfile tempdir);
use Bio::DB::BioDB;
use Bio::Seq;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Tools/Run/Ensembl.pm view on Meta::CPAN
my $swiss_species = lc($species);
$swiss_species =~ s/\s/+/g;
my $url = "http://www.expasy.org/cgi-bin/get-entries?db=sp&db=tr&DE=&GNc=AND&GN=$swiss_name&OC=$swiss_species&view=&num=100";
my $web_agent = Bio::WebAgent->new();
$web_agent->url($url);
my $rq = HTTP::Request->new(GET=>$url);
my $reply = $web_agent->request($rq);
if ($reply->is_error) {
$class->throw($reply->as_string()."\nError getting for url $url!\n");
}
my $content = $reply->content;
view all matches for this distribution
view release on metacpan or search on metacpan
Bio/DB/BioFetch.pm view on Meta::CPAN
# POD documentation - main docs before the code
#
package Bio::DB::BioFetch;
use strict;
use HTTP::Request::Common 'POST';
=head1 NAME
Bio::DB::BioFetch - Database object interface to BioFetch retrieval
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
view release on metacpan or search on metacpan
lib/BlankOnDev/HTTP/request.pm view on Meta::CPAN
use strict;
use warnings FATAL => 'all';
# Import :
use LWP::UserAgent ();
use HTTP::Request::Common;
# Version :
our $VERSION = '0.1005';;
# Subroutine for HTTP Request GET :
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BlueCoat/SGOS.pm view on Meta::CPAN
use strict;
use warnings;
use Data::Dumper;
use Date::Parse;
use LWP::UserAgent;
require HTTP::Request;
use HTTP::Request::Common qw/POST/;
our %_URL = (
'archconf_expanded' => '/archconf_expanded.txt',
'contentfilter_status' => '/ContentFilter/Status',
'sysinfo' => '/SYSINFO',
lib/BlueCoat/SGOS.pm view on Meta::CPAN
}
if (!defined($self->{'_lwpua'})) {
$self->_create_ua();
}
my $request =
HTTP::Request->new('GET',
$self->{'_applianceurlbase'} . $_URL{'sysinfo'});
$request->authorization_basic($self->{'_applianceusername'},
$self->{'_appliancepassword'});
my $response = $self->{'_lwpua'}->request($request);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BmltClient/ApiClient.pm view on Meta::CPAN
use MIME::Base64;
use LWP::UserAgent;
use HTTP::Headers;
use HTTP::Response;
use HTTP::Request::Common qw(DELETE POST GET HEAD PUT);
use HTTP::Status;
use URI::Query;
use JSON;
use URI::Escape;
use Scalar::Util;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bosch/RCPPlus.pm view on Meta::CPAN
=cut
use strict;
use URI;
use HTTP::Request;
use LWP::UserAgent;
use Bosch::RCPPlus::Response;
use Bosch::RCPPlus::AuthError;
sub new
lib/Bosch/RCPPlus.pm view on Meta::CPAN
push @headers, @{$args{headers}} if ($args{headers});
my $uri = $proto->uri;
$uri->query_form($args{query}) if ($args{query});
my $request = HTTP::Request->new(
$args{method} || 'GET',
$uri,
\@headers,
$args{content}
);
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
HTTP::Daemon 6.01
HTTP::Daemon::ClientConn 6.01
requirements:
ExtUtils::MakeMaker 0
HTTP::Date 6
HTTP::Request 6
HTTP::Response 6
HTTP::Status 6
IO::Socket 0
LWP::MediaTypes 6
Sys::Hostname 0
cpanfile.snapshot view on Meta::CPAN
HTTP::Headers 6.05
HTTP::Headers::Auth 6.00
HTTP::Headers::ETag 6.00
HTTP::Headers::Util 6.03
HTTP::Message 6.06
HTTP::Request 6.00
HTTP::Request::Common 6.04
HTTP::Response 6.04
HTTP::Status 6.03
requirements:
Compress::Raw::Zlib 0
Encode 2.21
cpanfile.snapshot view on Meta::CPAN
HTML::HeadParser 0
HTTP::Cookies 6
HTTP::Daemon 6
HTTP::Date 6
HTTP::Negotiate 6
HTTP::Request 6
HTTP::Request::Common 6
HTTP::Response 6
HTTP::Status 6
IO::Select 0
IO::Socket 0
LWP::MediaTypes 6
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Module/DomainHacks.pm view on Meta::CPAN
package Bot::BasicBot::Pluggable::Module::DomainHacks;
use strict;
use warnings;
use HTTP::Request::Common;
use LWP::UserAgent;
use Web::Scraper;
use Encode;
use base qw(Bot::BasicBot::Pluggable::Module);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Module/HTTPIRCGW.pm view on Meta::CPAN
my ($action, $url) = split'=>',$self->{hash}->{$regex}->{cmd};
my $callback = $self->{hash}->{$regex}->{callback};
$action =~ s/\s+//g;
$url =~ s/\s+//g;
if ($action eq "GET"){
my $req = HTTP::Request->new($action, $url);
$res = $self->{ua}->request($req);
} elsif ($action eq "POST") {
my ($url, $query) = split 'TNO', $url;
my @res = split '&', $query;
my %hash;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Module/PasteBin.pm view on Meta::CPAN
my $url = $self->get("user_pastebin_url");
my $ua = LWP::UserAgent->new;
$ua->agent("Bot/0.1");
my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content('query=libwww-perl&mode=dist');
my $res = $ua->request($req);
my $html = $res->content if $res->is_success;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Cobalt/Plugin/RSS.pm view on Meta::CPAN
return PLUGIN_EAT_NONE
}
## send request tagged w/ feedname
my $url = $feedmeta->{url};
my $req = HTTP::Request->new( 'GET', $url );
broadcast( 'www_request',
$req,
'rssplug_got_resp',
[ $feedname ],
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Cobalt/Plugin/YouTube.pm view on Meta::CPAN
use Bot::Cobalt::Common;
use strictures 2;
use HTML::TokeParser;
use HTTP::Request;
sub REGEX () { 0 }
sub new {
bless [
lib/Bot/Cobalt/Plugin/YouTube.pm view on Meta::CPAN
my $req_url = $self->_create_yt_link($base, $id);
logger->debug("dispatching request to $req_url");
broadcast( 'www_request',
HTTP::Request->new( GET => $req_url ),
'youtube_plug_resp_recv',
[ $req_url, $msg ],
);
1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Cobalt/Plugin/Extras/CPAN.pm view on Meta::CPAN
use Bot::Cobalt::Common;
use Bot::Cobalt::Serializer;
our $Serializer = Bot::Cobalt::Serializer->new('JSON');
use HTTP::Request;
use Module::CoreList;
use Try::Tiny;
lib/Bot/Cobalt/Plugin/Extras/CPAN.pm view on Meta::CPAN
my $base_url = 'http://api.metacpan.org';
my $this_url = $base_url . $url;
logger->debug("metacpan request: $this_url");
my $request = HTTP::Request->new(GET => $this_url);
broadcast( 'www_request',
$request,
'mcpan_plug_resp_recv',
$hints
view all matches for this distribution
view release on metacpan or search on metacpan
version: '1.4'
name: Bot-Pastebot
requires:
File::ShareDir: '0.05'
HTTP::Negotiate: '6.00'
HTTP::Request: '1.40'
HTTP::Response: '1.53'
POE: '1.007'
POE::Component::IRC: '5.03'
Perl::Tidy: '1.46'
Test::More: '0.63'
view all matches for this distribution