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


Horris

 view release on metacpan or  search on metacpan

lib/Horris/Connection/Plugin/PeekURL.pm  view on Meta::CPAN

                        channel => $msg->channel,
                        message => "Request failed: $headers->{Reason} ($headers->{Status})",
                    });
                    return;
                }
                @ct = split(/\s*,\s*/, $headers->{'content-type'});
                if (grep { /^image\/.+$/i } @ct) {
                    $ct = 1;
                } elsif ( grep { !/^text\/.+$/i } @ct) {
                    # otherwise it's something we don't know about.
                    # don't spend the time and memory to load this guy

 view all matches for this distribution


Hubot-Scripts-Bundle

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.1.9    Mon Jul 21 13:42:23 2014 KST
    - update dzil profile
    - added jira web hook event listner
    - updated readme
    - added <3 script
    - using content-type application/json

0.1.8    Fri Feb 14 01:46:35 2014 KST
    - [bugzilla] speak quicksearch url
    - [githubissue] added
    - perltidy all scripts

 view all matches for this distribution


Hubot

 view release on metacpan or  search on metacpan

lib/Hubot/Scripts/shorten.pm  view on Meta::CPAN

                )->get(
                sub {
                    my ( $body, $hdr ) = @_;
                    return if ( !$body || !$hdr->{Status} =~ /^2/ );

                    ## content-type
                    my @ct = split( /\s*,\s*/, $hdr->{'content-type'} );
                    if ( grep {/^image\/.+$/i} @ct || grep { !/text/i } @ct ) {
                        return $msg->send("[$ct[0]] - $bitly");
                    }

                    ### charset

 view all matches for this distribution


Hyper-Developer

 view release on metacpan or  search on metacpan

lib/Hyper/Developer/Server.pm  view on Meta::CPAN

    eval {
        my $svg = Hyper::Developer::Model::Viewer->new({
            for_class => $class,
        })->create_graph()->as_svg();
        print <<"EOT";
content-type:image/svg+xml

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"

lib/Hyper/Developer/Server.pm  view on Meta::CPAN

    my $namespace = $config->get_namespace();
    my $base_path = $config->get_base_path();

    eval {
        # Child
        print "content-type:text/html; charset=utf-8\n\n";
        my @flow_controls;
        my @container_controls;
        find(
            sub {
                m{.ini\Z} or return;

 view all matches for this distribution


Hypersonic

 view release on metacpan or  search on metacpan

lib/Hypersonic/Protocol/HTTP2.pm  view on Meta::CPAN

      ->line('    snprintf(status_buf, sizeof(status_buf), "%d", status);')
      ->line('    ')
      ->line('    /* Submit HTTP/2 response headers */')
      ->line('    nghttp2_nv hdrs[] = {')
      ->line('        { (uint8_t*)":status", (uint8_t*)status_buf, 7, strlen(status_buf), NGHTTP2_NV_FLAG_NONE },')
      ->line('        { (uint8_t*)"content-type", (uint8_t*)ct, 12, strlen(ct), NGHTTP2_NV_FLAG_NONE },')
      ->line('        { (uint8_t*)"content-length", (uint8_t*)cl_buf, 14, strlen(cl_buf), NGHTTP2_NV_FLAG_NONE },')
      ->line('    };')
      ->line('    ')
      ->line('    /* Create data provider for body */')
      ->line('    nghttp2_data_provider data_prd;')

lib/Hypersonic/Protocol/HTTP2.pm  view on Meta::CPAN

      ->line('static void h2_send_404(nghttp2_session* session, int32_t stream_id) {')
      ->line('    static const char* body = "Not Found";')
      ->line('    ')
      ->line('    nghttp2_nv hdrs[] = {')
      ->line('        { (uint8_t*)":status", (uint8_t*)"404", 7, 3, NGHTTP2_NV_FLAG_NONE },')
      ->line('        { (uint8_t*)"content-type", (uint8_t*)"text/plain", 12, 10, NGHTTP2_NV_FLAG_NONE },')
      ->line('        { (uint8_t*)"content-length", (uint8_t*)"9", 14, 1, NGHTTP2_NV_FLAG_NONE },')
      ->line('    };')
      ->line('    ')
      ->line('    nghttp2_data_provider data_prd;')
      ->line('    data_prd.source.ptr = (void*)body;')

lib/Hypersonic/Protocol/HTTP2.pm  view on Meta::CPAN

      ->line('    char status_str[4];')
      ->line('    snprintf(status_str, sizeof(status_str), "%d", status);')
      ->line('    ')
      ->line('    nghttp2_nv hdrs[] = {')
      ->line('        { (uint8_t*)":status", (uint8_t*)status_str, 7, strlen(status_str), NGHTTP2_NV_FLAG_NONE },')
      ->line('        { (uint8_t*)"content-type", (uint8_t*)content_type, 12, strlen(content_type), NGHTTP2_NV_FLAG_NONE },')
      ->line('    };')
      ->line('    ')
      ->line('    /* Submit headers WITHOUT END_STREAM - more DATA frames to come */')
      ->line('    int rv = nghttp2_submit_headers(session, NGHTTP2_FLAG_END_HEADERS,')
      ->line('                                     stream_id, NULL, hdrs, 2, NULL);')

 view all matches for this distribution


Hypothesis-API

 view release on metacpan or  search on metacpan

lib/Hypothesis/API.pm  view on Meta::CPAN

    }
    
    my $data = $json->encode($payload_out);
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations" );

lib/Hypothesis/API.pm  view on Meta::CPAN

        warn "No id given to delete.\n";
        return 0;
    }
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations/$id" );

lib/Hypothesis/API.pm  view on Meta::CPAN

        return -1;
    }

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    $self->ua->default_headers( $h );
    my $payload = {
        username => $self->username,

lib/Hypothesis/API.pm  view on Meta::CPAN

sub search {
    my ($self, $query, $page_size) = @_;

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    if (not defined $query) {
        $query = {};
    }

lib/Hypothesis/API.pm  view on Meta::CPAN

    #
    my ($self, $query, $page_size) = @_;

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    if (not defined $query) {
        $query = {};
    }

lib/Hypothesis/API.pm  view on Meta::CPAN

        die "Can only call update if given an id.";
    }
    my $data = $json->encode($payload);
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations/$id" );

 view all matches for this distribution


IDS-HTTP

 view release on metacpan or  search on metacpan

lib/IDS/DataSource/HTTP.pm  view on Meta::CPAN

	    # 14.12 Content-Language; simple and already handled by key+value
    'content-length'		=> 'IDS::DataSource::HTTP::Int',		# 14.13
	    # 14.14 Content-Location likely to be server->client
    'content-md5'		=> 'IDS::DataSource::HTTP::MD5',		# 14.15
	    # 14.16 Content-Range is server->client
    'content-type'		=> 'IDS::DataSource::HTTP::Accept',		# 14.17
    'date'			=> 'IDS::DataSource::HTTP::Date',		# 14.18
    'etag'			=> 'IDS::DataSource::HTTP::ETag',		# 14.19
    'expect'			=> 'IDS::DataSource::HTTP::Expectation',	# 14.20
    'expires'			=> 'IDS::DataSource::HTTP::Date',		# 14.21
    'from'			=> 'IDS::DataSource::HTTP::EmailAddr',	# 14.22

 view all matches for this distribution


IMAP-Client

 view release on metacpan or  search on metacpan

t/09annotations.t  view on Meta::CPAN


use IMAP::Client;

my $client = IMAP::Client->new;

my @getannotation_response = ('* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/lastupdate" ("value.shared" "19-Sep-2006 12:51:07 -0400" "content-type.shared" "text/plain" "size.shared" "26")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/size" ("value.shared" "4424" "content-type.shared" "text/plain" "size.shared" "4")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/partition" ("value.shared" "default" "content-type.shared" "text/plain" "size.shared" "7")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/server" ("value.shared" "imapbackend.server1.com" "content-type.shared" "text/plain" "size.shared" "23")'."\r\n",
'. OK Completed'."\r\n",);

my %resp = IMAP::Client::parse_annotation(\@getannotation_response ,'user.emailj',$client);

is (scalar (keys %resp), 1);

 view all matches for this distribution


IO-HTML

 view release on metacpan or  search on metacpan

lib/IO/HTML.pm  view on Meta::CPAN

      } # Skip comment
      elsif (m!\G<meta(?=[\x09\x0A\x0C\x0D /])!gic) {
        my ($got_pragma, $need_pragma, $charset);

        while (my ($name, $value) = &_get_attribute) {
          if ($name eq 'http-equiv' and $value eq 'content-type') {
            $got_pragma = 1;
          } elsif ($name eq 'content' and not defined $charset) {
            $need_pragma = $expect_pragma
                if defined($charset = _get_charset_from_meta($value));
          } elsif ($name eq 'charset') {

 view all matches for this distribution


IO-HyCon

 view release on metacpan or  search on metacpan

lib/IO/HyCon.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:support@citrusperl.org" />
</head>

<body>

 view all matches for this distribution


IO-Moose

 view release on metacpan or  search on metacpan

html/lib/IO/Moose.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>IO::Moose - Reimplementation of IO::* with improvements</title>
<link rel="stylesheet" href="../../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:support@ActiveState.com" />
</head>

<body>
<table border="0" width="100%" cellspacing="0" cellpadding="3">

 view all matches for this distribution


IO-Socket-SSL

 view release on metacpan or  search on metacpan

lib/IO/Socket/SSL.pm  view on Meta::CPAN


        # the info given when the version is zero is not that useful for us
        $ssl_ver >>= 8;  # check the upper 8 bits only below */

        # SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL
        # always pass-up content-type as 0. But the interesting message-type
        # is at 'buf[0]'.

	my $tls_rt_name = ($ssl_ver == $trace_constants{SSL3_VERSION_MAJOR} && $content_type)
	    ? $tc_type2s{$content_type} || "TLS Unknown (type=$content_type)"
	    : "";

 view all matches for this distribution


IRC-Indexer

 view release on metacpan or  search on metacpan

examples/chart_users_cron.pl  view on Meta::CPAN

  ## You'll get a HTTP::Response object.
  if ($response->is_success) {
    my $zipped = $response->content;

    ## Should've gotten gzipped JSON back.
    die "Unknown content-type: ".$response->content_type
      unless $response->content_type eq 'application/x-gzip';
    my $json    = memGunzip($zipped);
    my $netinfo = decode_json($json);
    
    my $user_count = $netinfo->{GlobalUsers} // 0;

 view all matches for this distribution


Image-ExifTool

 view release on metacpan or  search on metacpan

lib/Image/ExifTool/HTML.pm  view on Meta::CPAN

   'content-disposition' => { Name => 'ContentDisposition' },
   'content-language'    => { Name => 'ContentLanguage' },
   'content-script-type' => { Name => 'ContentScriptType' },
   'content-style-type'  => { Name => 'ContentStyleType' },
    # note: setting the HTMLCharset like this will miss any tags which come earlier
   'content-type'        => { Name => 'ContentType', RawConv => \&SetHTMLCharset },
   'default-style'       => { Name => 'DefaultStyle' },
    expires              => { },
   'ext-cache'           => { Name => 'ExtCache' },
    imagetoolbar         => { Name => 'ImageToolbar' },
    lotus                => { },

 view all matches for this distribution


Image-Tileset

 view release on metacpan or  search on metacpan

Tileset.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>Image::Tileset - A tileset loader.</title>
<link rel="stylesheet" href="pod.css" type="text/css" />
<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


Image-VisualConfirmation

 view release on metacpan or  search on metacpan

examples/basic_example.pl  view on Meta::CPAN

            $h->meta({
                'http-equiv'    => 'expires',
                'content'       => '-1',
            }),
            $h->meta({
                'http-equiv'    => 'content-type',
                'content'       => 'text/html; charset=UTF-8',
            }),
            $h->title('Image::VisualConfirmation CAPTCHA integration demo'),
        ]),
        $h->body([

 view all matches for this distribution


Imager

 view release on metacpan or  search on metacpan

lib/Imager/Files.pod  view on Meta::CPAN


set STDOUT to autoflush

=item 2.

output a content-type header, and optionally a content-length header

=item 3.

put STDOUT into binmode

 view all matches for this distribution


Installer

 view release on metacpan or  search on metacpan

lib/Installer/cpanm.pm  view on Meta::CPAN

$fatpacked{"File/pushd.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_PUSHD';
  use strict;use warnings;package File::pushd;our$VERSION='1.009';our@EXPORT=qw(pushd tempd);our@ISA=qw(Exporter);use Exporter;use Carp;use Cwd qw(getcwd abs_path);use File::Path qw(rmtree);use File::Temp qw();use File::Spec;use overload q{""}=>sub {...
FILE_PUSHD

$fatpacked{"HTTP/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'HTTP_TINY';
  package HTTP::Tiny;use strict;use warnings;our$VERSION='0.056';use Carp ();my@attributes;BEGIN {@attributes=qw(cookie_jar default_headers http_proxy https_proxy keep_alive local_address max_redirect max_size proxy no_proxy timeout SSL_options verif...
      sub $sub_name {
          my (\$self, \$url, \$args) = \@_;
          \@_ == 2 || (\@_ == 3 && ref \$args eq 'HASH')
          or Carp::croak(q/Usage: \$http->$sub_name(URL, [HASHREF])/ . "\n");
          return \$self->request('$req_method', \$url, \$args || {});

 view all matches for this distribution


Intellexer-API

 view release on metacpan or  search on metacpan

lib/Intellexer/API.pm  view on Meta::CPAN

    );

    return $self->_react(
        $ua->post(
            $uri_obj,
            'content-type' => 'application/json',
            Content => $json->encode($url_list),
        )
    );

}

lib/Intellexer/API.pm  view on Meta::CPAN

    );

    return $self->_react(
        $ua->post(
            $uri_obj,
            'content-type' => 'application/json',
            Content => $json->encode({'text1' => $text1, 'text2' => $text2}),
        )
    );
}

lib/Intellexer/API.pm  view on Meta::CPAN

    );

    return $self->_react(
        $ua->get(
            $uri_obj,
            'content-type' => 'application/json',
        )
    );

}

lib/Intellexer/API.pm  view on Meta::CPAN

    );

    return $self->_react(
        $ua->post(
            $uri_obj,
            'content-type' => 'multipart/form-data',
            Content => [path($file)->basename => [$file,] ],
        )
    );
}

lib/Intellexer/API.pm  view on Meta::CPAN

    );

    return $self->_react(
        $ua->post(
            $uri_obj,
            'content-type' => 'multipart/form-data',
            Content => [ path($file1)->basename =>[$file1],
                         path($file2)->basename =>[$file2] ],
        )
    );
}

 view all matches for this distribution


JMAP-Tester

 view release on metacpan or  search on metacpan

lib/JMAP/Tester.pm  view on Meta::CPAN

#pod   my $result = $tester->upload(\%arg);
#pod
#pod Required arguments are:
#pod
#pod   accountId - the account for which we're uploading (no default)
#pod   type      - the content-type we want to provide to the server
#pod   blob      - the data to upload. Must be a reference to a string
#pod
#pod This uploads the given blob.
#pod
#pod The return value will either be a L<failure

lib/JMAP/Tester.pm  view on Meta::CPAN

#pod
#pod The first hashref provides values that go into the download URI:
#pod
#pod   blobId    - the blob to download (no default)
#pod   accountId - the account for which we're downloading (no default)
#pod   type      - the content-type we want the server to provide back (no default)
#pod   name      - the name we want the server to provide back (default: "download")
#pod
#pod If the download URI template has a C<blobId>, C<accountId>, or C<type>
#pod placeholder but no argument for that is given to C<download>, an exception
#pod will be thrown.

lib/JMAP/Tester.pm  view on Meta::CPAN

  my $result = $tester->upload(\%arg);

Required arguments are:

  accountId - the account for which we're uploading (no default)
  type      - the content-type we want to provide to the server
  blob      - the data to upload. Must be a reference to a string

This uploads the given blob.

The return value will either be a L<failure

lib/JMAP/Tester.pm  view on Meta::CPAN


The first hashref provides values that go into the download URI:

  blobId    - the blob to download (no default)
  accountId - the account for which we're downloading (no default)
  type      - the content-type we want the server to provide back (no default)
  name      - the name we want the server to provide back (default: "download")

If the download URI template has a C<blobId>, C<accountId>, or C<type>
placeholder but no argument for that is given to C<download>, an exception
will be thrown.

 view all matches for this distribution


JQuery

 view release on metacpan or  search on metacpan

lib/JQuery/jquery_js/jquery/jquery-latest.js  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


JRPC

 view release on metacpan or  search on metacpan

JRPC/Client.pm  view on Meta::CPAN


Factory method to instantiate and prepare a new JSON-RPC request to a URL. Options in %opts:

=over 4 

=item * 'mime' - Mime content-type for request (default: 'application/json')

=item * 'debug' - Dump Request after instantiation (to STDERR).

=back

 view all matches for this distribution


JS-Chicken

 view release on metacpan or  search on metacpan

tests/lib/Test/Base.js  view on Meta::CPAN

        if (hdrName != null) {
          this._headers[this._headers.length] = {h:hdrName, v:hdrValue};
          switch (hdrName.toLowerCase()) {
            case 'content-encoding': gotContentEncoding = true; break;
            case 'content-length'  : gotContentLength   = true; break;
            case 'content-type'    : gotContentType     = true; break;
            case 'date'            : gotDate            = true; break;
            case 'expires'         : gotExpiration      = true; break;
            case 'last-modified'   : gotLastModified    = true; break;
          }
        }

 view all matches for this distribution


JS-JSON

 view release on metacpan or  search on metacpan

tests/lib/Test/Base.js  view on Meta::CPAN

        if (hdrName != null) {
          this._headers[this._headers.length] = {h:hdrName, v:hdrValue};
          switch (hdrName.toLowerCase()) {
            case 'content-encoding': gotContentEncoding = true; break;
            case 'content-length'  : gotContentLength   = true; break;
            case 'content-type'    : gotContentType     = true; break;
            case 'date'            : gotDate            = true; break;
            case 'expires'         : gotExpiration      = true; break;
            case 'last-modified'   : gotLastModified    = true; break;
          }
        }

 view all matches for this distribution


JS-SourceMap

 view release on metacpan or  search on metacpan

t/fixtures/jquery.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;

t/fixtures/jquery.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 firstDataType, ct, finalDataType, type,
		contents = s.contents,

t/fixtures/jquery.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


JS-Test-Base

 view release on metacpan or  search on metacpan

lib/JS/Test/Base.js  view on Meta::CPAN

        if (hdrName != null) {
          this._headers[this._headers.length] = {h:hdrName, v:hdrValue};
          switch (hdrName.toLowerCase()) {
            case 'content-encoding': gotContentEncoding = true; break;
            case 'content-length'  : gotContentLength   = true; break;
            case 'content-type'    : gotContentType     = true; break;
            case 'date'            : gotDate            = true; break;
            case 'expires'         : gotExpiration      = true; break;
            case 'last-modified'   : gotLastModified    = true; break;
          }
        }

 view all matches for this distribution


JS-jQuery

 view release on metacpan or  search on metacpan

lib/JS/jQuery.js  view on Meta::CPAN

		} catch(e){}
		return false;
	},

	httpData: function( xhr, type, filter ) {
		var ct = xhr.getResponseHeader("content-type"),
			xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
			data = xml ? xhr.responseXML : xhr.responseText;

		if ( xml && data.documentElement.tagName == "parsererror" )
			throw "parsererror";

 view all matches for this distribution


JSON-GRDDL

 view release on metacpan or  search on metacpan

lib/JSON/GRDDL.pm  view on Meta::CPAN

		my $r  = $self->_fetch($s,
			Accept => 'application/schema+json, application/x-schema+json, application/json');
		
		if (defined $r
		&&  $r->code == 200
		&&  $r->header('content-type') =~ m#^\s*(((application|text)/(x-)?json)|(application/(x-)?schema\+json))\b#)
		{
			my $schema = from_json($r->decoded_content);
			if (defined $schema->{'$schemaTransformation'})
			{
				$T = $self->_resolve_relative_ref($schema->{'$schemaTransformation'}, $s);

lib/JSON/GRDDL.pm  view on Meta::CPAN

	
	my $r = $self->_fetch($transformation_uri,
		Accept => 'application/ecmascript, application/javascript, text/ecmascript, text/javascript, application/x-ecmascript');
	if (defined $r
	&&  $r->code == 200
	&&  $r->header('content-type') =~ m#^\s*((application|text)/(x-)?(java|ecma)script)\b#)
	{
		return $self->transform_by_jsont($document, $uri, $r->decoded_content, $name, %options);
	}
	
	return;

 view all matches for this distribution


JSON-RPC-Simple

 view release on metacpan or  search on metacpan

lib/JSON/RPC/Simple/Dispatcher.pm  view on Meta::CPAN


The encoder/decoder object to use. Defaults to L<JSON> with utf8 on.

=item charset

The charset to send in the content-type when creating the response. Defaults 
to C<utf-8>.

=item error_handler 

A reference to a subroutine which is invoked when an error occurs. May 

 view all matches for this distribution


JSON-Schema-Modern-Document-OpenAPI

 view release on metacpan or  search on metacpan

t/validate_response.t  view on Meta::CPAN

          \$ref: '#/components/responses/foo'
        default:
          \$ref: '#/components/responses/default'
YAML

  # response has no content-type, content-length or body.
  cmp_deeply(
    ($result = $openapi->validate_response(response(200), { path_template => '/foo', method => 'post' }))->TO_JSON,
    { valid => true },
    'missing Content-Type does not cause an exception',
  );

 view all matches for this distribution


( run in 0.870 second using v1.01-cache-2.11-cpan-39bf76dae61 )