view release on metacpan or search on metacpan
'body' => bless( do{\(my $o = 'hi')}, 'Text::MicroTemplate::EncodedString' ),
'cookies' => {},
'finalized_headers' => 1,
'headers' => bless( {
'content-length' => 2,
'content-type' => 'text/html; charset=utf8',
'status' => '200',
'x-catalyst' => '5.80013'
}, 'HTTP::Headers' ),
'status' => '200'
}, 'Catalyst::Response' ),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/MojoTemplate.pm view on Meta::CPAN
These are just pass thru to L<Mojo::Template>. See that for details
=head2 content_type
The HTTP content-type that is set in the response unless it is already set.
=head2 helpers
A hashref of helper functions. For example:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/PDFBoxer.pm view on Meta::CPAN
{
$Catalyst::View::PDFBoxer::VERSION = '0.001';
}
use Moose::Role;
# ABSTRACT: Runs view output through PDF::Boxer and sets response content-type if not already set.
use PDF::Boxer 0.003;
use PDF::Boxer::SpecParser;
use namespace::clean -except => 'meta';
lib/Catalyst/View/PDFBoxer.pm view on Meta::CPAN
=pod
=head1 NAME
Catalyst::View::PDFBoxer - Runs view output through PDF::Boxer and sets response content-type if not already set.
=head1 VERSION
version 0.001
lib/Catalyst/View/PDFBoxer.pm view on Meta::CPAN
=head1 DESCRIPTION
This is a Role which takes the current $c->response->body, runs it through
PDF::Boxer as it's "spec" file to get a PDF::API2 object. $c->response->body
is then set to the stringified PDF and content-type is set accordingly.
=head1 METHOD MODIFIERS
=head2 before process
Sets content-type to 'application/pdf; charset=utf-8' if not already set.
=head2 after process
Takes the current $c->response->body, runs it through PDF::Boxer as it's "spec"
file to get a PDF::API2 object. $c->response->body is then set to the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/TT/ForceUTF8.pm view on Meta::CPAN
'utf-8' is set by default. See more detail L<Template::Provider::Encoding>.
=item CONTENT TYPE
When you set *STRICT_CONTENT_TYPE* configuration,
It automatically set content-type 'application/xhtml+xml; charset=utf-8'
for browsers except MSIE.
=back
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
- Added POD tests and made them pass.
- updated for Catalyst 5
- New TT Helpers.
0.09 Wed Mar 29 13:47:00 2005
- Don't override user-set charset/content-type
- Cleaned up the content-type we set.
- Updated README to current POD to current POD
0.08 Wed Mar 29 12:22:00 2005
- changed order of stash so stash can override c/base/name
- fixed some typos
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/Template/Lace/Tutorial.pod view on Meta::CPAN
->http_ok;
}
__PACKAGE__->meta->make_immutable;
Here you can see we are calling the view and passing it the required attributes. Attributes can also come from application configuration (or even the stash, if you are using the role L<Catalyst::View::Template::Lace::Role::ArgsFromStash>). In this ...
<html>
<head>
<title>
User Info
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/Template/PHP.pm view on Meta::CPAN
foreach my $headerref (@{$self->{_headers}}) {
my ($header, $replace) = @$headerref;
my ($key, $value) = split /:\s+/, $header, 2;
next if lc $key eq 'content-length';
if (lc $key eq 'content-type') {
$c->response->content_type($value);
} elsif (lc $key eq 'content-encoding') {
$c->response->content_encoding($value);
} else {
if ($replace) {
lib/Catalyst/View/Template/PHP.pm view on Meta::CPAN
As with L<Catalyst::View::TT>, the contents of the stash (C<< $c->stash >>)
will be accessible in PHP as global variables.
=item C<< $HTTP_RAW_POST_DATA >>, C<< php://input >>
On POST requests where the content-type is not C<multipart/form-data>
or C<application/x-www-url-form-encoded>, the global PHP variable
C<$HTTP_RAW_POST_DATA> and the PHP input stream C<< php://input >>
will be set to contain the content of the request.
C<Catalyst::View::Template::PHP> cannot currently set up PHP's
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/Templated.pm view on Meta::CPAN
Called by Catalyst to render a template. Renders the template
returned by C<< $self->template >> and sets the response body to the
result of the template evaluation.
Also sets up a content-type header for text/html with the charset of
the data (utf8 if the data contains utf8 characters, iso-8859-1
otherwise).
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for CatalystX-CRUD-Controller-REST
0.005 18 Nov 2015
- two_args_POST now defers to model to indicate support for $model->create_related
- refactor tests to set explicit content-type for PUT requests (https://rt.cpan.org/Ticket/Display.html?id=108962)
0.004 11 May 2014
- fix bug calling status_bad_request()
0.003 01 Jan 2013
view all matches for this distribution
view release on metacpan or search on metacpan
t/test3/conf.t view on Meta::CPAN
$t->queue_frame_to_receive(Net::Stomp::Frame->new({
command => 'MESSAGE',
headers => {
destination => $dest,
'content-type' => 'json',
type => $type,
'message-id' => $code,
},
body => qq{{"foo":"$dest","bar":"$type"}},
}));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Controller/ExtJS/REST/SimpleExcel.pm view on Meta::CPAN
extends 'CatalystX::Controller::ExtJS::REST';
with 'CatalystX::Controller::ExtJS::REST::SimpleExcel';
1;
Access C<< /users?content-type=application%2Fvnd.ms-excel >> to get the excel file.
=head1 DESCRIPTION
This role loads L<Catalyst::Action::Serialize::SimpleExcel> and adds
C<< application/vnd.ms-excel >> to the type map. When requesting a list of
view all matches for this distribution
view release on metacpan or search on metacpan
root/static/advanced.html view on Meta::CPAN
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Uploader With DataTable Example</title>
<!-- Required YUI files -->
<link rel="stylesheet" type="text/css" href="/static/js/yui/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="/static/js/yui/build/datatable/assets/skins/sam/datatable.css" />
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Action/ExtJS/Serialize.pm view on Meta::CPAN
=head1 PUBLIC METHODS
=head2 execute
Wrap the serialized response in a textarea field if there was a file upload.
Furthermore set the C<content-type> to C<< text/html >>.
=cut
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
1.101700 2010-06-19
- Fixed prereq
1.101670 2010-06-16
- Fixed content-type for Direct API
- Fixed prereq
1.101570 2010-06-06
- Fixed bogus bug where C::View::JSON prepends the BOM when agent = Safari
- Fixed meta to not include example/tutorial libs
view all matches for this distribution
view release on metacpan or search on metacpan
is $res->code, 300, 'HTTP 300';
$res = $cb->(GET "?id=0&format=yaml");
is $res->content, "---\nhello: world\n", 'content';
is $res->code, 200, 'HTTP 200';
is $res->header('content-type'), 'text/yaml', 'YAML';
$res = $cb->(GET "?id=abc&format=yaml");
is $res->code, 404, 'HTTP 404';
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Store/Resolver/API.pm view on Meta::CPAN
return decode_json($response->decoded_content);
} else {
# If it is 404, it could be that the "new" api works,
# but that the entity doesn't exist. So we check for
# the presence of the error "Entity not found"
# Also, the new API returns the application/json content-type
# while the old doesn't.
if ($response->code == 404) {
if ($response->content_type eq 'application/json') {
return {
'data' => {}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ceph/RadosGW/Admin/HTTPRequest.pm view on Meta::CPAN
my ( $self, $method, $path, $headers, $expires ) = @_;
my %interesting_headers = ();
while ( my ( $key, $value ) = each %$headers ) {
my $lk = lc $key;
if ( $lk eq 'content-md5'
or $lk eq 'content-type'
or $lk eq 'date'
or $lk =~ /^$AMAZON_HEADER_PREFIX/ )
{
$interesting_headers{$lk} = $self->_trim($value);
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/flickr.pl view on Meta::CPAN
warn "$headers->{Status} $headers->{Reason}";
return;
}
# Load the image with a Pixbuf Loader
my ($mime) = split(/\s*;/, $headers->{'content-type'}, 1);
my $loader = Gtk2::Gdk::PixbufLoader->new_with_mime_type($mime);
$loader->write($content);
$loader->close;
my $pixbuf = $loader->get_pixbuf;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/site/01 Linux at Home/10_Snapshots_Save.shtml view on Meta::CPAN
<head>
<!-- ======================================================= -->
<!-- Created by AbiWord, a free, Open Source wordprocessor. -->
<!-- For more information visit http://www.abisource.com. -->
<!-- ======================================================= -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Snapshots Save</title>
<meta name="Author" content="jo" />
<link href="10_Snapshots_Save.shtml/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
=item * $object->Content_Noheader
# Assign object to another object with no Content Type header
# Can be used to view an object without the header
# This should not be sent to the phone since the phone needs a content-type
$myobject = $object->Content_Noheader;
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Factory/Mailer.pm view on Meta::CPAN
sub send_message {
my ( $self, $instructions ) = @_;
$self = $self->new unless ref $self;
return unless $instructions->{subject} && $instructions->{to};
$instructions->{from} ||= $self->config->get('mail_from');
$instructions->{'content-type'} ||= ($instructions->{as_html}) ? 'text/html; charset="iso-8859-1"' : 'text/plain';
my $message;
my $header = join("\n", map("$_: " . $instructions->{lc($_)}, qw(To From Subject Content-Type)));
$header .= "\n\n";
view all matches for this distribution
view release on metacpan or search on metacpan
README.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>ClearCase::Argv README</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
SYNCTREE.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>synctree - Normalize a tree of flat files with a tree of ClearCase elements</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ClearPress/controller.pm view on Meta::CPAN
my $charset = $viewobject->charset();
$charset = ($charset && !exists $ENV{REDIRECT_STATUS}) ? qq[;charset=$charset] : q[];
my $content_type = sprintf q[%s%s], $viewobject->content_type(), $charset;
#########
# update the content-type/charset with whatever the view determined was right for the response
#
$headers->header('Content-Type', $content_type);
if($decor) {
# if($content_type =~ /text/smx && $charset =~ /utf-?8/smix) {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/jquery-1.6.2.min.js view on Meta::CPAN
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Thu Jun 30 14:16:56 2011 -0400
*/
(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("ifram...
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\...
)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CljPerl/quoi/default_template.clp view on Meta::CPAN
(defmacro default-template [title xml]
`(fn [S]
#[html
^{:xmlns "http://www.w3.org/1999/xhtml"}
#[head
#[meta ^{:http-equiv "content-type" :content "text/html; charset=UTF-8"}]
#[meta ^{:name "description" :content ""}]
#[meta ^{:name "keywords" :content ""}]
#[title ~title]
#[script ^{:id "jquery"
:src "/javascripts/jquery-1.9.1.min.js"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Clustericious/Client.pm view on Meta::CPAN
}
if ($res->is_success) {
TRACE "Got response : ".$res->to_string;
my $content_type = $res->headers->content_type || do {
WARN "No content-type from "._sanitize_url($url);
"text/plain";
};
return $method =~ /HEAD|DELETE/ ? 1
: $content_type =~ qr[application/json] ? decode_json($res->body)
: $res->body;
view all matches for this distribution
view release on metacpan or search on metacpan
share/js/jquery-1.11.3.js view on Meta::CPAN
return target;
}
/* Handles responses to an ajax request:
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
function ajaxHandleResponses( s, jqXHR, responses ) {
var firstDataType, ct, finalDataType, type,
contents = s.contents,
dataTypes = s.dataTypes;
// 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;
share/js/jquery-1.11.3.js view on Meta::CPAN
requestHeaders[ name ] = value;
}
return this;
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( !state ) {
s.mimeType = type;
}
return this;
view all matches for this distribution
view release on metacpan or search on metacpan
share/web/templates/_elements/header 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=utf-8" />
<meta name="robots" content="all" />
<title><% _($title) %></title>
<% Jifty->web->include_css %>
view all matches for this distribution
view release on metacpan or search on metacpan
t/app/Plack/App/Directory.t view on Meta::CPAN
},
branch { '=',
left => leaf '$dir_page',
right => leaf '<html><head>
<title>%s</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; }
t/app/Plack/App/Directory.t view on Meta::CPAN
# Stolen from rack/directory.rb
my $dir_file = "<tr><td class='name'><a href='%s'>%s</a></td><td class='size'>%s</td><td class='type'>%s</td><td class='mtime'>%s</td></tr>";
my $dir_page = <<PAGE;
<html><head>
<title>%s</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