Group
Extension

Matches 7

SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Message.pm ( view source; MetaCPAN )
e|SPVM::Mojo::Headers/"max_line_size"> field.

=head2 json

C<method json : object ();>

Decode JSON message body directly using L<JSON|SPVM::JSON> if possible, an C<undef> return value indicates a ba
's a 16MiB limit for requests and a 2GiB limit for responses by default.

  # Extract JSON values
  say $msg->json->(Hash)->get("foo")->(Hash)->get("bar")->(List)->get(23)->(string);

=head2 parse

C<
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/UserAgent/Transactor.pm ( view source; MetaCPAN )
 [(object)form => {a => "b"}])->req->to_string;

  # PUT request with JSON data
  say $t->tx(PUT => "example.com" => [(object)json => {a => "b"}])->req->to_string;

=head1 Generators

These content ge
ntent. See L</"tx"> for more.

=head2 json

  $t->tx(PATCH => "http://example.com" => [(object)json => {a => "b"}]);

Generate JSON content with L<JSON|SPVM::JSON>. See L</"tx"> for more.

=head2 mult
nt::Transactor::Callback::Generator>;>

Registered content generators, by default only C<form>, C<json> and C<multipart> are already defined.

=head2 name

C<has name : rw string;>

Value for C<User-A
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Transaction/HTTP.pm ( view source; MetaCPAN )
GET");
  $tx->req->url->parse("http://example.com");
  $tx->req->headers->set_accept("application/json");
  say $tx->res->code;
  say $tx->res->headers->content_type;
  say $tx->res->body;
  say $tx->
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Headers.pm ( view source; MetaCPAN )
 header value, shortcut for the C<Accept> header.

Examples:

  $headers->set_accept("application/json");

=head2 accept_charset

C<method accept_charset : string ();>

Get current header value, short
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Transaction/WebSocket.pm ( view source; MetaCPAN )
WebSocket::Frame) {
    
  });

=head2 json

Emitted when a complete WebSocket message has been received, all text and binary messages will be automatically JSON
decoded. Note that this event only get
id ($ws : L<Mojo::Transaction::WebSocket|SPVM::Mojo::Transaction::WebSocket>, $json : object);>

Examples:

  $ws->on(json => method : void ($ws : Mojo::Transaction::WebSocket, $hash : object) { say "
$bytes});
  my $frame = $ws->build_message({text   => $bytes});
  my $frame = $ws->build_message({json   => $data});
  my $frame = $ws->build_message($chars);

=head2 client_read

C<method client_read
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/UserAgent.pm ( view source; MetaCPAN )
JSON API request with Basic authentication
  my $url = (my $_ = Mojo::URL->new("https://example.com/test.json"), $_->set_userinfo("sri:☃"), $_);
  my $value = $ua->get($url)->result->json;

  # JSON
 POST (application/json) with TLS certificate authentication
  my $tx = ($ua->set_cert("tls.crt"), $ua->set_key("tls.key"), $ua->post("https://example.com" => [(object)json => {top => "secret"}]));

 
p("socks://127.0.0.1:9050");
  $ua->get("api.3g2upl4pq6kufc4m.onion/?q=mojolicious&format=json")->result->json;

  # GET request via UNIX domain socket "/tmp/myapp.sock" (percent encoded slash)
  say 
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Transaction.pm ( view source; MetaCPAN )
y $hash   = $tx->req->params->to_hash;
  my $all    = $tx->req->uploads;
  my $value  = $tx->req->json;

=head2 res

C<has res : rw L<Mojo::Message::Response|SPVM::Mojo::Message::Response>;>

HTTP res
ader");
  my $bytes   = $tx->res->body;
  my $str     = $tx->res->text;
  my $value   = $tx->res->json;

=head2 connection

C<has connection : rw L<Mojo::Connection|SPVM::Mojo::Connection>;>

Connecti

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.