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


Mojo-SMTP-Client

 view release on metacpan or  search on metacpan

lib/Mojo/SMTP/Client.pm  view on Meta::CPAN

		To      => 'you@work.org',
		Subject => encode('MIME-Header', decode('utf-8', '世界, 労働, 5月!')),
		Data    => 'Novosibirsk (Russian: Новосибирск; IPA: [nəvəsʲɪˈbʲirsk]) is the third most populous '.
		           'city in Russia after Moscow and St. Petersburg and the most populous city in Asian Russia'
	);
	$msg->attr('content-type.charset' => 'UTF-8');
	
	$smtp->send(
		from => 'me@home.org',
		to   => 'you@work.org',
		data => $msg->as_string

 view all matches for this distribution


Mojo-Server-AWSLambda

 view release on metacpan or  search on metacpan

example/lib/Mojo/Server/AWSLambda/Response.pm  view on Meta::CPAN

    foreach my $header (keys %{$headers}) {
       $singleValueHeaders->{lc $header} = $headers->{$header};
       push @{$multiValueHeaders->{lc $header} //= []}, $headers->{$header};
    }

    my $type = $singleValueHeaders->{'content-type'};
    my $isBase64Encoded = $type !~ m(^text/.*|application/(:?json|javascript|xml))i;
    if ($isBase64Encoded) {
        $body = encode_base64 $body, '';
    } 
    else {

 view all matches for this distribution


Mojo-Weixin

 view release on metacpan or  search on metacpan

doc/Weixin.pod  view on Meta::CPAN

    $client->send_media($friend|$group,"/tmp/test.txt");

    #发送url指定的文件
    $client->send_media($friend|$group,"http://www.example.com/test.jpg");

    #默认情况下,程序依靠文件扩展名或者url响应中的content-type等信息来识别媒体的格式,可能会导致识别不准确而影响发送
    #这种情况下你可以传递一个hash的结构,手动指定媒体的相关信息
    $client->send_media($friend|$group,{
        media_path => '/tmp/hello.txt', #媒体路径,可以是本地文件路径或者http协议的url
        media_data => 'hello world',    #可选,用于直接发送内存数据,优先级高于 media_path,
        media_mime => 'text/plain',     #可选,默认是 application/octet-stream,用于指定

 view all matches for this distribution


MojoMojo

 view release on metacpan or  search on metacpan

lib/MojoMojo/Controller/Attachment.pm  view on Meta::CPAN

    my $io_file = IO::File->new( $att->filename )
        or $c->detach('default');
    $io_file->binmode;

    $c->res->output( $io_file );
    $c->res->header( 'content-type', $att->contenttype );
    $c->res->header(
        "Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $att->name ) );
    $c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );
}

lib/MojoMojo/Controller/Attachment.pm  view on Meta::CPAN

    my $io_file = IO::File->new( $att->thumb_filename )
        or $c->detach('default');
    $io_file->binmode;

    $c->res->output( $io_file );
    $c->res->header( 'content-type', $att->contenttype );
    $c->res->header( "Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $att->name ) );
    $c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );

}

lib/MojoMojo/Controller/Attachment.pm  view on Meta::CPAN

    my $io_file = IO::File->new( $att->inline_filename )
        or $c->detach('default');
    $io_file->binmode;

    $c->res->output( $io_file );
    $c->res->header( 'content-type', $c->stash->{att}->contenttype );
    $c->res->header(
        "Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $c->stash->{att}->name ) );
    $c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );

}

 view all matches for this distribution


( run in 1.271 second using v1.01-cache-2.11-cpan-0d8aa00de5b )