view release on metacpan or search on metacpan
t/01sanity.t view on Meta::CPAN
BEGIN { use_ok('A1z::HTML5::Template') };
my $h = new A1z::HTML5::Template;
is( $h->VERSION, 0.22, "Version 0.22");
is( $h->NAME, "Fast and Easy Web Apps", "A complete web page with just 3 lines of perl code");
like ( $h->head, qr/charset=UTF-8/i, "charset UTF-8 is set by default for default content-type");
like ( $h->body, qr/<\/body>/i, "Default - HTML5 compatible web page");
view all matches for this distribution
view release on metacpan or search on metacpan
docs/AI-Perceptron-Simple-1.04.html view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AI/SimulatedAnnealing.htm view on Meta::CPAN
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AI::SimulatedAnnealing – optimize a list of numbers
according to a specified cost function.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="mailto:" rev="made"/>
</head>
<body style="background-color: white">
<ul>
<li><a href="#name">NAME</a></li>
view all matches for this distribution
view release on metacpan or search on metacpan
doc/code.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>AMF::Perl - Flash Remoting in Perl and Python</title>
<style>
body {
scrollbar-3d-light-color: #000000;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CLI.pm view on Meta::CPAN
options.
Query parameters are represented as command line options starting with
C<--q->:
% metacpancl GET /pod/:module App::Spec --q-content-type text/x-pod
=head1 NAME
App::Spec - Specification for commandline apps
...
lib/API/CLI.pm view on Meta::CPAN
% digitaloceancl GET /<TAB>
/account -- Account information
/droplets -- List all droplets
/droplets/:id -- Retrieve a droplet by id
% metacpancl GET /pod/:module App::Spec --q-content-type text/<TAB>
text/html text/plain text/x-markdown text/x-pod
Bash users: Note that completion for options and parameters currently does not
work.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CPanel.pm view on Meta::CPAN
my $request = HTTP::Request->new( GET => $query_string );
$request->header( Authorization => $auth_hash );
my $response = $ua->request( $request );
my $content = $response->content;
if ($response->header('content-type') eq 'text/xml') {
warn $content if $DEBUG;
return $content;
} else {
return '';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Eulerian/EDW/Request.pm view on Meta::CPAN
{
my ( $class, $response ) = @_;
my $type;
# Get content type value from HTTP response
$type = $response->header( 'content-type' );
if( defined( $type ) ) {
# Split content type into an array.
my @subtypes = split( '; ', $type );
# Iterate on subtypes entries
foreach my $subtype ( @subtypes ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/ISPManager.pm view on Meta::CPAN
my $response = $ua->get($query_string);
if ($response->is_success) {
my $content = $response->content;
if ($response->header('content-type') eq 'text/xml') {
# allow only XML answers
if ($content && $content =~ /^<\?xml version="\d\.\d" encoding="UTF-8"\?>/s) {
warn $content if $DEBUG;
return $content;
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/ParallelsWPB.pm view on Meta::CPAN
my $ua = LWP::UserAgent->new();
my $req = HTTP::Request->new( $data->{req_type} => $url );
if ( $data->{req_type} eq 'POST' || $data->{req_type} eq 'PUT' ) {
$req->header( 'content-type' => 'application/json' );
$req->content( $post_data );
}
$req->authorization_basic( $self->{username}, $self->{password} );
$ua->ssl_opts( verify_hostname => 0 );
view all matches for this distribution
view release on metacpan or search on metacpan
Changelog for API-Stripe
0.07 2015-10-12T20:41:41
- Updated build.
- Fixed content-type for DELETE, PATCH, POST, and PUT requests.
0.06 2015-10-11T08:10:30
- v0.06
- Updated build.
- Modified the implementation style and dependencies.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APISchema/Validator.pm view on Meta::CPAN
$content_type = $content_type =~ s/\s*;.*$//r;
$encoding_spec //= DEFAULT_ENCODING_SPEC;
if (ref $encoding_spec) {
$encoding_spec = $encoding_spec->{$content_type};
return ( undef, { message => "Wrong content-type: $content_type" } )
unless $encoding_spec;
}
my $method = $encoding_spec;
return ( undef, {
view all matches for this distribution
view release on metacpan or search on metacpan
html/Simple.html view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap/Plugins/Mail.pm view on Meta::CPAN
if ( $debug >= 2 ) {
print ref ($self), "::receiving_fingerprint_mails(): Header\n", $head->stringify, "\n\n";
print ref ($self), "::receiving_fingerprint_mails(): MIME-Version: ", $head->get ('MIME-Version'), "\n";
print ref ($self), "::receiving_fingerprint_mails(): MIME-Type: ", $head->mime_type, "\n";
print ref ($self), "::receiving_fingerprint_mails(): MIME-Encoding: ", $head->mime_encoding, "\n";
print ref ($self), "::receiving_fingerprint_mails(): Content-Type Charset: ", $head->mime_attr ('content-type.charset'), "\n"if ( $head->mime_attr('content-type.charset') );
print ref ($self), "::receiving_fingerprint_mails(): Content-Type Name: ", $head->mime_attr('content-type.name'), "\n" if ( $head->mime_attr('content-type.name') );
print ref ($self), "::receiving_fingerprint_mails(): Multipart Boundary: ", $head->multipart_boundary, "\n" if ( $head->multipart_boundary );
}
print "\n", ref ($self), "::receiving_fingerprint_mails(): HEAD\n" if ($debug);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4/PSGI.pm view on Meta::CPAN
foreach my $up ( keys %{ $preq->uploads } )
{
my $upload = $preq->uploads->{$up};
push @pairs, $up => [
$upload->{tempname}, $upload->{filename},
'content-type' => $upload->{'content-type'}
];
}# end foreach()
# Now we can upload:
$api->ua->upload( $env->{REQUEST_URI}, \@pairs );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4.pm view on Meta::CPAN
use MIME::Base64;
$Server->Mail(
from => 'foo@bar.com',
to => 'bar@foo.com',
subject => 'Hello, world!',
'content-type' => 'text/html',
'content-transfer-encoding' => 'base64',
message => encode_base64(<<"HTML")
<html>
<body>
<p>This is an html email.</p>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4x/Captcha/Imager.pm view on Meta::CPAN
my $str = "";
$img->write(type=>'png', data => \$str)
or die $img->errstr;
$Response->Expires( -30 );
$Response->AddHeader( pragma => 'no-cache' );
$Response->SetHeader('content-type' => 'image/png');
$Response->ContentType( 'image/png' );
$Response->Write( $str );
}# end run()
view all matches for this distribution
view release on metacpan or search on metacpan
author/publish-perl-runtime-archives.pl view on Meta::CPAN
head_or_put("$name/$sha256.zip", $zip);
my $metadata = encode_json({
url => "https://shogo82148-lambda-perl-runtime-us-east-1.s3.amazonaws.com/$name/$sha256.zip",
});
run_command("echo '$metadata' | aws --region 'us-east-1' s3 cp --content-type application/json - s3://shogo82148-lambda-perl-runtime-us-east-1/$name.json");
}
}
if ($force) {
say STDERR "FORCE TO DEPLOY";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/S3/Bucket.pm view on Meta::CPAN
confess "Cannot get file: ", $res->as_string, " " unless $res->is_success;
return AWS::S3::File->new(
bucket => $s,
key => $key || undef,
size => $res->header( 'content-length' ) || 0,
contenttype => $res->header( 'content-type' ) || 'application/octet-stream',
etag => $res->header( 'etag' ) || undef,
lastmodified => $res->header( 'last-modified' ) || undef,
is_encrypted => ( $res->header( 'x-amz-server-side-encryption' ) || '' ) eq 'AES256' ? 1 : 0,
);
} # end file()
view all matches for this distribution
view release on metacpan or search on metacpan
t/01.basic.t view on Meta::CPAN
is($request->method,'POST','request method correct');
is($request->header('Host'),'iam.amazonaws.com','host correct');
is($request->header('X-Amz-Date'),'20140101T060000Z','timestamp correct');
is($request->content,'Action=ListUsers&Version=2010-05-08','payload correct');
is($request->header('Authorization'),'AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20140101/us-east-1/iam/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=0233049369ae675cea7616efa5d2e5216c37a4b1496a36595f32181f078e3549',...
$request = GET('https://iam.amazonaws.com?Action=ListUsers&Version=2010-05-08',
Date => '1 January 2014 01:00:00 -0500');
my $expected = 'https://iam.amazonaws.com?Action=ListUsers&Version=2010-05-08&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIDEXAMPLE%2F20140101%2Fus-east-1%2Fiam%2Faws4_request&X-Amz-Date=20140101T060000Z&X-Amz-SignedHeaders=host&X-Amz-Signatu...
view all matches for this distribution
view release on metacpan or search on metacpan
docs/Acme-FishFarm-1.01.html view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Acme::FishFarm - A Fish Farm with Automated Systems</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-test.t view on Meta::CPAN
'vary' => 'Accept-Encoding',
'server' => 'nginx/1.10.0 (Ubuntu)',
'connection' => 'keep-alive',
'date' => 'Mon, 13 Mar 2017 15:49:56 GMT',
'content-length' => '178',
'content-type' => 'text/html'
},
'protocol' => 'HTTP/1.1',
'status' => '404',
};});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
} catch(e){}
return false;
},
/* Get the data out of an XMLHttpRequest.
* Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
* otherwise return plain text.
* (String) data - The type of data that you're expecting back,
* (e.g. "xml", "html", "script")
*/
httpData: function( r, type ) {
var ct = r.getResponseHeader("content-type");
var data = !type && ct && ct.indexOf("xml") >= 0;
data = type == "xml" || data ? r.responseXML : r.responseText;
// If the type is "script", eval it in global context
if ( type == "script" )
view all matches for this distribution
view release on metacpan or search on metacpan
Acme-PIA-Export-0.019.html view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Module Acme::PIA::Export</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
## make sure our doll is of the right class
isa_ok( $doll, 'Acme::Voodoo::Doll_0' );
## see if we can call a method on it
like( $doll->header(), qr{content-type: text/html}i, 'CGI voodooo doll works');
## see if we can see the pins (aka methods)
ok( $doll->pins() > 10, 'pins() found some pins' );
## see if we can sleep
view all matches for this distribution
view release on metacpan or search on metacpan
dyncall/doc/manual/manual_tex4ht.cfg view on Meta::CPAN
% Clear default header, define our custom one. Using @HEAD will make this be used on all pages generated.
% @@@Ideally, this wouldn't be a copy&paste of the website's header, here. Such
% thing should be done in the website build, and this here a generic header
% (however, style is kinda needed).
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta http-equiv="content-type" content="text/html; charset=utf-8"/>\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="resource-type" content="document"/>\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="keywords" content="C, function, dynamic, call, calling, convention, VM, abstraction, closure"/>\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="distribution" content="global"/>\Hnewline}}
% should this really rely on online content (dyncall's .css) even for an offline build? @@@ also, we need a relative path here, so this complicates things further
\Configure{@HEAD}{\HCode{<link rel="stylesheet" href="/data/main.css" type="text/css" media="all"/>\Hnewline}}
view all matches for this distribution
view release on metacpan or search on metacpan
t/alien_base_modulebuild_repository_http.t view on Meta::CPAN
'reason' => 'Internal Exception',
'url' => 'https://mytest.test',
'success' => '',
'status' => 599,
'headers' => {
'content-type' => 'text/plain',
'content-length' => 110,
},
'content' => "IO::Socket::SSL 1.42 must be installed for https support\n" .
"Net::SSLeay 1.49 must be installed for https support\n",
};
t/alien_base_modulebuild_repository_http.t view on Meta::CPAN
is(
[Alien::Base::ModuleBuild::Repository::HTTP->check_http_response($res)],
[1, "IO::Socket::SSL 1.42 must be installed for https support\n" .
"Net::SSLeay 1.49 must be installed for https support\n" .
"See https://github.com/PerlAlien/Alien-Base-ModuleBuild/issues/6#issuecomment-417097485",
{ 'content-type' => 'text/plain', 'content-length' => 110 }, "https://mytest.test" ]
);
};
subtest '599 other' => sub {
t/alien_base_modulebuild_repository_http.t view on Meta::CPAN
'reason' => 'Internal Exception',
'url' => 'https://mytest.test',
'success' => '',
'status' => 599,
'headers' => {
'content-type' => 'text/plain',
'content-length' => 13,
},
'content' => "Some Error!\n",
};
is(
[Alien::Base::ModuleBuild::Repository::HTTP->check_http_response($res)],
[1, "Some Error!\n",
{ 'content-type' => 'text/plain', 'content-length' => 13 }, "https://mytest.test" ]
);
};
subtest '404 bad url' => sub {
my $res = {
'headers' => {
'content-type' => 'text/plain',
'content-length' => length("404 Not Found\n"),
},
'url' => 'https://mytest.test/bogus',
'protocol' => 'HTTP/1.1',
'status' => '404',
t/alien_base_modulebuild_repository_http.t view on Meta::CPAN
};
is(
[Alien::Base::ModuleBuild::Repository::HTTP->check_http_response($res)],
[1, "404 Not Found",
{ 'content-type' => 'text/plain', 'content-length' => 14 }, "https://mytest.test/bogus" ],
);
};
};
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/dir/http.html view on Meta::CPAN
<html><head>
<title>Index of /corpus/dist/</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type='text/css'>
table { width:100%%; }
.name { text-align:left; }
.size, .mtime { text-align:right; }
.type { width:11em; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Fetch/HTTPTiny.pm view on Meta::CPAN
}
die "error fetching $url: $status $reason";
}
my($type) = split /;/, $res->{headers}->{'content-type'};
$type = lc $type;
my $base = URI->new($res->{url});
my $filename = File::Basename::basename do { my $name = $base->path; $name =~ s{/$}{}; $name };
# TODO: this doesn't get exercised by t/bin/httpd
view all matches for this distribution
view release on metacpan or search on metacpan
cp/codepress/languages/html.js view on Meta::CPAN
{ input : 'h3', output : '<h3>$0</h3>' },
{ input : 'h4', output : '<h4>$0</h4>' },
{ input : 'h5', output : '<h5>$0</h5>' },
{ input : 'h6', output : '<h6>$0</h6>' },
{ input : 'html', output : '<html>\n\t$0\n</html>' },
{ input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
{ input : 'img', output : '<img src="$0" alt="" />' },
{ input : 'input', output : '<input name="$0" id="" type="" value="" />' },
{ input : 'label', output : '<label for="$0"></label>' },
{ input : 'legend', output : '<legend>\n\t$0\n</legend>' },
{ input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
view all matches for this distribution
view release on metacpan or search on metacpan
test/functional/autoCompleter/basic.html view on Meta::CPAN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link href="../../test.css" rel="stylesheet" type="text/css">
<link href="../../images/GvaScript.css" rel="stylesheet" type="text/css">
<script src="../../../lib/Alien/GvaScript/lib/prototype.js"></script>
<script src="../../../lib/Alien/GvaScript/lib/GvaScript.js"></script>
view all matches for this distribution