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


Developer-Dashboard

 view release on metacpan or  search on metacpan

lib/Developer/Dashboard/CLI/Ask.pm  view on Meta::CPAN

sub _call_claude_api {
    my (%a) = @_;
    require HTTP::Request;
    my $url = $a{base_url} . '/v1/messages';
    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


Device-CableModem-Zoom5341

 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


Device-Firmata

 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


Device-WebIO-Dancer

 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


Dezi-App

 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


Dezi-Client

 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


Digest-JHash

 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


Dist-Zilla-Plugin-AutoPrereqs-Perl-Critic

 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


Dist-Zilla-Plugin-Bitbucket

 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


Dist-Zilla-Plugin-GitHub-UploadRelease

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

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


Dist-Zilla-Plugin-OnlyCorePrereqs

 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


Dist-Zilla-Plugin-PromptIfStale

 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


Dist-Zilla-PluginBundle-Codeberg

 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


Dist-Zilla-PluginBundle-GitLab

 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


DocSet

 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


Docker-Registry

 view release on metacpan or  search on metacpan

t/03_gce.t  view on Meta::CPAN

    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&amp;location=EU&amp;repo_name=v2/_catalog">here</A>.
</BODY></HTML>');

 view all matches for this distribution


Document-OOXML

 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


Drogo

 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


Dwimmer

 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


Dyn

 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


E-Mail-Acme

 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


EBook-FB2

 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


EBook-Ishmael

 view release on metacpan or  search on metacpan

lib/EBook/Ishmael/EBook/FictionBook2.pm  view on Meta::CPAN

            }
        }
    }

    for my $n ($xpc->findnodes('/FictionBook:FictionBook/FictionBook:binary')) {
        my $mime = $n->getAttribute('content-type');
        next if not defined $mime;
        my $format = mimetype_id($mime);
        next if not defined $format;
        push @{ $self->{_images} }, [ $n, $format ];
    }

lib/EBook/Ishmael/EBook/FictionBook2.pm  view on Meta::CPAN

        my $href = $img->getAttribute('l:href') or last;
        $href =~ s/^#//;
        my ($binary) = $xpc->findnodes(
            "/FictionBook:FictionBook/FictionBook:binary[\@id=\"$href\"]"
        ) or last;
        my $mime = $binary->getAttribute('content-type');
        last if not defined $mime;
        my $format = mimetype_id($mime);
        last if not defined $format;
        $self->{_cover} = [ $binary, $format ];
    }}

 view all matches for this distribution


EBook-Tools

 view release on metacpan or  search on metacpan

lib/EBook/Tools.pm  view on Meta::CPAN

    }

    $output = $xmeta->first_child('output');
    if($output) {
	my $encoding = $mobiencodings{$output->att('encoding')};
	my $contenttype = $mobicontenttypes{$output->att('content-type')};

	if($contenttype) {
	    $output->set_att('encoding','utf-8') if(!$encoding);
	    debug(2,"DEBUG: setting encoding only and returning");
	    return 1;

lib/EBook/Tools.pm  view on Meta::CPAN



    # At this stage, we definitely have <output> in the right place.
    # Set the attributes and return.
    $output->set_att('encoding' => 'utf-8',
		     'content-type' => 'text/x-oeb1-document');
    debug(2,"DEBUG[/",$subname,"]");
    return 1;
}


 view all matches for this distribution


EPublisher-Source-Plugin-MetaCPAN

 view release on metacpan or  search on metacpan

lib/EPublisher/Source/Plugin/MetaCPAN.pm  view on Meta::CPAN

        my $result;

        eval {
            $result = $mcpan->pod(
                module         => $release_name_metacpan,
                'content-type' => 'text/x-pod',
            );
            1;
        } or do {
            $self->publisher->debug(
                "103: Can't retrieve pod for $release_name_metacpan"

lib/EPublisher/Source/Plugin/MetaCPAN.pm  view on Meta::CPAN

            eval {
                $pod_src = $mcpan->pod(
                    author         => $module_result->{author},
                    release        => $module_result->{name},
                    path           => $file,
                    'content-type' => 'text/x-pod',
                );

                1;
            } or do{ $self->publisher->debug( $@ ); next; };

 view all matches for this distribution


EV-Kafka

 view release on metacpan or  search on metacpan

eg/produce_headers.pl  view on Meta::CPAN


$kafka->connect(sub {
    $kafka->produce('test-topic', 'event-key', '{"action":"click","page":"/home"}',
        {
            headers => {
                'content-type' => 'application/json',
                'trace-id'     => 'abc-123-def',
                'source'       => 'web-frontend',
            },
        },
        sub {

 view all matches for this distribution


EV-WebKit

 view release on metacpan or  search on metacpan

eg/intercept.pl  view on Meta::CPAN

        }

        # 2. MOCK: answer locally, without the network seeing anything.
        if ($req->{url} =~ m{/robots\.txt$}) {
            return { status => 200,
                     headers => { 'content-type' => 'text/plain' },
                     body    => "User-agent: *\nDisallow: /\n" };
        }

        # 3. REWRITE: change the request that does go out. Anything set here
        #    overrides curl-impersonate's own template header of the same name.

 view all matches for this distribution


EV-YACurl

 view release on metacpan or  search on metacpan

eg/multipart.pl  view on Meta::CPAN


    while (my $conn = $listener->accept) {
        my $request = read_request($conn) or next;
        my $body = '';

        my ($boundary) = ($request->{headers}{'content-type'} // '') =~ /boundary=(\S+)/;
        if ($boundary) {
            for my $part (split /--\Q$boundary\E/, $request->{body}) {
                my ($head, $data) = split /\r\n\r\n/, $part, 2;
                next unless defined $data && $head =~ /name="([^"]+)"/;
                my $name = $1;

 view all matches for this distribution


EVDB-API

 view release on metacpan or  search on metacpan

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

      push @{$args}, $k, $self->{$k};
    }
  }
  
  # If one of the arguments is a file, set up the Common-friendly 
  # file indicator field and set the content-type.
  my $content_type = '';
  foreach my $this_field (keys %{$arg_present})
  {
    # Any argument with a name that ends in "_file" is a file.
    if ($this_field =~ /_file$/)

 view all matches for this distribution


( run in 3.524 seconds using v1.01-cache-2.11-cpan-800906f7e73 )