view release on metacpan or search on metacpan
t/transaction.t view on Meta::CPAN
$t->content_unlike(qr/Marketing/, 'Phase 4: filter removes non-matching row');
# Phase 5: export to CSV.
$t->get_ok('/export?l=' . url_escape('table:employees') . '&format=csv')
->status_is(200, 'Phase 5: CSV export returns 200')
->content_type_like(qr{text/csv}, 'Phase 5: content-type is text/csv')
->content_like(qr/Alice/, 'Phase 5: exported CSV contains data');
# Phase 6: export to SQLite (requires DBD::SQLite).
SKIP: {
eval { DBI->install_driver('SQLite') }
or skip 'DBD::SQLite not available for SQLite export', 2;
$t->get_ok('/export?l=' . url_escape('table:employees') . '&format=sqlite')
->status_is(200, 'Phase 6: SQLite export returns 200')
->content_type_like(qr{sqlite}, 'Phase 6: content-type contains sqlite');
}
}
# Phase 7: upload a TSV file and open it (always run if upload route works).
SKIP: {
t/transaction.t view on Meta::CPAN
$t->content_unlike(qr/Flywheel/, 'Phase 4: filter removes non-matching row');
# Phase 5: CSV export of a .sqlite3 source.
$t->get_ok('/export?l=' . url_escape("path:$db_path") . '&format=csv')
->status_is(200, 'Phase 5: CSV export of .sqlite3 returns 200')
->content_type_like(qr{text/csv}, 'Phase 5: content-type is text/csv');
# Phase 6: browse directory shows the .sqlite3 file.
$t->get_ok('/browse?path=' . url_escape($dir))
->status_is(200, 'Phase 6: browse dir returns 200');
$t->content_like(qr/widgets\.sqlite3/, 'Phase 6: .sqlite3 file listed in browser');
t/transaction.t view on Meta::CPAN
$t->content_unlike(qr/Beta/, 'Phase 4: filter removes non-matching row');
# Phase 5: CSV export of a .sqlite source.
$t->get_ok('/export?l=' . url_escape("path:$db_path") . '&format=csv')
->status_is(200, 'Phase 5: CSV export of .sqlite returns 200')
->content_type_like(qr{text/csv}, 'Phase 5: content-type is text/csv');
# Phase 6: browse directory shows the .sqlite file.
$t->get_ok('/browse?path=' . url_escape($dir))
->status_is(200, 'Phase 6: browse dir returns 200');
$t->content_like(qr/readings\.sqlite/, 'Phase 6: .sqlite file listed in browser');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Calc/Endpoints.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@osx300.apple.com" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
WeekOfYear.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>Date::WeekOfYear - Simple routine to return the ISO 8601 week of the year (as well as the ISO week year)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
# HTML header
print <<"EOT";
<html>
<head><title>$labels{calendar}</title>
<meta http-equiv='content-type' content='Text/html; charset=utf-8' />
</head>
<body>
EOT
print qq(<p align='center'><img src='$pict'>\n) if $pict;
# Column headers for the first six months
view all matches for this distribution
view release on metacpan or search on metacpan
examples/web/jquery-1.5.2.js view on Meta::CPAN
match = responseHeaders[ key.toLowerCase() ];
}
return match === undefined ? null : match;
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( !state ) {
s.mimeType = type;
}
return this;
examples/web/jquery-1.5.2.js view on Meta::CPAN
});
/* Handles responses to an ajax request:
* - sets all responseXXX fields accordingly
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
function ajaxHandleResponses( s, jqXHR, responses ) {
var contents = s.contents,
examples/web/jquery-1.5.2.js view on Meta::CPAN
if ( type in responses ) {
jqXHR[ responseFields[type] ] = responses[ type ];
}
}
// Remove auto dataType and get content-type in the process
while( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
}
}
// Check if we're dealing with a known content-type
if ( ct ) {
for ( type in contents ) {
if ( contents[ type ] && contents[ type ].test( ct ) ) {
dataTypes.unshift( type );
break;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Deplide/RFID/EPCISSubmitter.pm view on Meta::CPAN
my $self = shift;
my $message = shift;
my $request = HTTP::Request::Common::POST($self->{_url});
$request->content($message);
$request->header('content-type' => 'application/xml');
$request->header('content-length' => length($message));
$request->authorization_basic($self->{_user}, $self->{_password});
my $response = $self->{_ua}->request($request);
return $response;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/SizeMe/Graph/static/jquery-1.8.1-min.js view on Meta::CPAN
/*! jQuery v@1.8.1 jquery.com | jquery.org/license */
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d=...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Developer/Dashboard/CLI/Ask.pm view on Meta::CPAN
sub _call_nova_api {
my (%a) = @_;
require HTTP::Request;
my $url = $a{base_url} . '/v1/chat/completions';
my $req = HTTP::Request->new( POST => $url );
$req->header( 'content-type' => 'application/json' );
$req->header( 'authorization' => "Bearer $a{key}" );
$req->content(
json_encode(
{
model => $a{model},
lib/Developer/Dashboard/CLI/Ask.pm view on Meta::CPAN
my @messages = @{ $a{messages} };
my $tools = _claude_tools();
for ( 1 .. $MAX_TOOL_USE_ROUNDS ) {
my $req = HTTP::Request->new( POST => $url );
$req->header( 'content-type' => 'application/json' );
$req->header( 'x-api-key' => $a{key} );
$req->header( 'anthropic-version' => '2023-06-01' );
$req->content(
json_encode(
{
view all matches for this distribution
view release on metacpan or search on metacpan
t/rf_connection.sample view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DOCSIS3.0 Cable Modem</title>
<meta http-equiv="content-type" content="application/xhtml+xml"; charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../css/web.css"/>
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/ie6.css"/>
<script type="text/javascript" language="Javascript" src="../js/hover.js"></script>
view all matches for this distribution
view release on metacpan or search on metacpan
presentation/scripts/jquery.js view on Meta::CPAN
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&...
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);r...
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._...
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var ...
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f)...
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){...
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n===...
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","padd...
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;f...
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments)...
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.repl...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/WebIO/Dancer.pm view on Meta::CPAN
my $bitrate = params->{bitrate};
$webio->vid_set_kbps( $name, $channel, $bitrate );
return '';
};
get '/devices/:name/video/:channel/allowed-content-types' => sub {
my $name = params->{name};
my $channel = params->{channel};
my $allowed = $webio->vid_allowed_content_types( $name, $channel );
return join( "\n", @$allowed );
};
lib/Device/WebIO/Dancer.pm view on Meta::CPAN
$webio->img_set_width( $name, $pin, $width );
$webio->img_set_height( $name, $pin, $height );
return 1;
};
get '/devices/:name/image/:pin/allowed-content-types' => sub {
my $name = params->{name};
my $pin = params->{pin};
my $types = $webio->img_allowed_content_types( $name, $pin );
return join( "\n", @$types );
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dezi/Aggregator/Spider.pm view on Meta::CPAN
}
if ( $response->ct ) {
$self->debug and $self->write_log(
uri => $uri,
msg => 'content-type: ' . $response->ct,
);
}
# add its links to the queue.
# If the resource looks like an XML feed of some kind,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dezi/Client.pm view on Meta::CPAN
}
return $self;
}
=head2 index( I<doc> [, I<uri>, I<content-type>, I<GET_params>] )
Add or update a document. I<doc> should be one of:
=over
lib/Dezi/Client.pm view on Meta::CPAN
A Dezi::Doc object.
=back
I<uri> and I<content-type> are optional, except in the
I<scalar_ref> case, where I<uri> is required. If specified,
the values are passed explicitly in the HTTP headers to the Dezi
server. If not specified, they are (hopefully intelligently) guessed at.
Returns a L<HTTP::Response> object which can be interrogated to
view all matches for this distribution
view release on metacpan or search on metacpan
html/JHash.html view on Meta::CPAN
<!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>JHash.pm</title>
<link rel="stylesheet" href="./html/docs.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Local/HTTP/Tiny/Mock.pm view on Meta::CPAN
',
'protocol' => 'HTTP/1.1',
'headers' => {
'server' => 'nginx/1.6.3',
'cache-control' => 'max-age=1800',
'content-type' => 'text/yaml',
'x-timer' => 'S1506018172.065497,VS0,VE2',
'x-cache-hits' => '1, 1',
'content-length' => '12653',
'date' => 'Thu, 21 Sep 2017 18:22:52 GMT',
'connection' => 'keep-alive',
t/lib/Local/HTTP/Tiny/Mock.pm view on Meta::CPAN
'headers' => {
'accept-ranges' => 'bytes',
'x-cache' => 'MISS, MISS',
'date' => 'Thu, 21 Sep 2017 19:16:05 GMT',
'server' => 'nginx/1.6.3',
'content-type' => 'text/plain',
'via' => [
'1.1 varnish',
'1.1 varnish'
],
'fastly-debug-digest' => 'abe8f8abc3c33a054b261732aa0cb98d62f1ca227a5aafd2fa53981ccd3d1f62',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Bitbucket/Create.pm view on Meta::CPAN
# construct the HTTP request!
my $http = HTTP::Tiny->new;
my ($login, $pass) = $self->_get_credentials(0);
$headers->{'authorization'} = "Basic " . MIME::Base64::encode_base64("$login:$pass", '');
$headers->{'content-type'} = "application/json";
# We use the v2.0 API to create
my $url = 'https://api.bitbucket.org/2.0/repositories/' . $login . '/' . $repo_name; # TODO encode the repo_name and login?
$self->log([ "Creating new Bitbucket repository '%s'", $repo_name ]);
my $response = $http->request( 'POST', $url, {
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Dist-Zilla-Plugin-Github-UploadRelease
0.002 2016-05-01
- Spit out File::LibMagic and hardcode content-type
- Add dependency for Git::Tag plugin
0.001 2016-05-01
- Inital release
view all matches for this distribution
view release on metacpan or search on metacpan
t/05-check-dual-life-versions.t view on Meta::CPAN
status => '200',
reason => 'OK',
protocol => 'HTTP/1.1',
url => $url,
headers => {
'content-type' => 'text/x-yaml',
},
content =>
$module eq 'feature' ? '---
distfile: R/RJ/RJBS/perl-5.20.0.tar.gz
version: 1.36
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/NoNetworkHits.pm view on Meta::CPAN
status => '200',
reason => 'OK',
protocol => 'HTTP/1.1',
url => $url,
headers => {
'content-type' => 'text/x-yaml',
},
content => exists $::modules_and_responses{$module} ? $::modules_and_responses{$module}
: die "should not be checking for $module",
};
die 'should not be checking for ' . $module;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Codeberg/Create.pm view on Meta::CPAN
]
);
my $url = $self->api . '/user/repos';
$content = encode_json($params);
$headers->{'content-type'} = 'application/json';
$self->log_debug("Sending POST $url");
my $response = $http->request(
'POST', $url,
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/GitLab/Create.pm view on Meta::CPAN
]
);
my $url = $self->api . '/projects';
$content = encode_json($params);
$headers->{'content-type'} = 'application/json';
$self->log_debug("Sending POST $url");
my $response = $http->request(
'POST', $url,
{
view all matches for this distribution
view release on metacpan or search on metacpan
bin/html2ps view on Meta::CPAN
$req = HTTP::Request->new(GET => $url);
$req->authorization_basic(@_) if(@_);
$ua->agent($spoof) if($spoof);
my $res = $ua->request($req);
$code=$res->code;
$contyp=$res->header('content-type');
$cont=$res->content;
} else {
require "www.pl";
@opts=@_?("authorization=$_[0]:$_[1]"):();
push(@opts,"quiet") if(!$opt_d);
view all matches for this distribution
view release on metacpan or search on metacpan
cmp_ok($result->name, 'eq', 'test2-registry');
cmp_ok($result->tags->[0], 'eq', 'version1');
}
{
$io->set_content('<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://console.cloud.google.com/m/gcr/images/redirect?project=infraestructura-global&location=EU&repo_name=v2/_catalog">here</A>.
</BODY></HTML>');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Document/OOXML/ContentTypes.pm view on Meta::CPAN
use utf8;
package Document::OOXML::ContentTypes;
use Moose;
use namespace::autoclean;
# ABSTRACT: Part to content-type mapping for OOXML
use XML::LibXML;
my $CONTENT_TYPES_NS = 'http://schemas.openxmlformats.org/package/2006/content-types';
has defaults => (
is => 'ro',
isa => 'ArrayRef[HashRef]'
);
lib/Document/OOXML/ContentTypes.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Document::OOXML::ContentTypes - Part to content-type mapping for OOXML
=head1 VERSION
version 0.181410
lib/Document/OOXML/ContentTypes.pm view on Meta::CPAN
say "The content type of /word/document.xml is " . $ct->get_content_type_for_part('/word/document.xml');
=head1 DESCRIPTION
OOXML files contain a file named '[Content_Types].xml' that describes the
content-types of all the other files in the package.
This class implements a way to look up the content-type for a file name,
given the contents of that file.
=head1 METHODS
=head2 new_from_xml($xml_data)
lib/Document/OOXML/ContentTypes.pm view on Meta::CPAN
Creates a new L<Document::OOXML::ContentTypes> instance from the contents
of the C</[Content-Types].xml> file from an OOXML file.
=head2 get_content_type_for_part($part_name)
Returns the content-type of the part with the specified name.
=head1 SEE ALSO
=over
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Drogo/Guts.pm view on Meta::CPAN
my ($self, $key, $value) = @_;
$request_data{headers}{$key} = $value;
}
=head3 $self->header('content-type')
Set content type.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dwimmer/Feed/Sendmail.pm view on Meta::CPAN
my $att = MIME::Lite->new(
Type => 'text',
Data => $content->{$t},
Encoding => 'quoted-printable',
);
$att->attr("content-type" => "$type{$t}; charset=UTF-8");
$att->replace("X-Mailer" => "");
$att->attr('mime-version' => '');
$att->attr('Content-Disposition' => '');
$msg->attach($att);
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
lib/E/Mail/Acme.pm view on Meta::CPAN
use overload '""' => sub {
my ($self) = @_;
if (@{$self->[ @$self ]}) {
unless (($self->{'content-type'}->[0]||'') =~ qr{^multipart/}) {
warn "content-type set, but not multipart on multipart message"
if $self->{'content-type'};
delete $self->{'content-type'};
$self->{'content-type'} = qq{multipart/mixed};
}
unless ($self->{'content-type'}->[0] =~ qr{boundary="(?:[^"]+)"}) {
$self->{'content-type'}->[0] .= qq{; boundary="$self->[@$self+1]"};
}
}
join(
$CRLF,
lib/E/Mail/Acme.pm view on Meta::CPAN
Any lines in a multi-part e-mail message form the preamble, and an arrayref of
subparts is always available at the end of the e-mail -- that is, like this:
my $subparts = $e_mail->[ scalar @$e_mail ];
Nested multipart messages are handled just fine. A multipart content-type will
be added, if none has been supplied. If a multipart content-type is set, but
the boundary is not, it will be added. Do not set your own boundary unless you
know what you are doing! You will probably produce a corrupt message!
=head1 SENDING MAIL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/EBook/FB2/Binary.pm view on Meta::CPAN
my @nodes = $node->findnodes('@id');
if (@nodes) {
$self->id($nodes[0]->getValue());
}
@nodes = $node->findnodes('@content-type');
if (@nodes) {
$self->content_type($nodes[0]->getValue());
}
# XXX: eval this, it might fail with invalid data
lib/EBook/FB2/Binary.pm view on Meta::CPAN
Returns content of binary element (base64-decoded)
=item content_type()
Returns content-type of binary element
=back
=head1 AUTHOR
view all matches for this distribution