Group
Extension

Matches 2

Net-HTTP-Knork ( B/BH/BHSERROR/Net-HTTP-Knork-0.20.tar.gz, BHSERROR, 2015; MetaCPAN )
Net-HTTP-Knork/lib/Net/HTTP/Knork.pm ( view source; MetaCPAN )
ght implementation of Spore specification
use Moo;
use Sub::Install;
use Try::Tiny;
use Carp;
use JSON::MaybeXS;
use Data::Rx;
use LWP::UserAgent;
use URI;
use File::ShareDir ':ALL';
use Subclass::Of;
d => 1,
    coerce   => sub {
        my $json_spec = $_[0];
        my $spec;

        # it could be a file
        try {
            open my $fh, '<', $json_spec or croak 'Cannot read the spec file'
spec = decode_json(<$fh>);
            close $fh;
        }
        catch {
            try {
                $spec = decode_json($json_spec);
            }

            # it is not json, so we are re
Net-HTTP-Knork ( B/BH/BHSERROR/Net-HTTP-Knork-0.20.tar.gz, BHSERROR, 2015; MetaCPAN )
Net-HTTP-Knork/lib/Net/HTTP/Knork/Response.pm ( view source; MetaCPAN )
;

    my $response = Net::HTTP::Knork::Response->new(
        200, ['Content-Type', 'application/json'], '{"foo":1}';
    );
    $response->request($request);

=head1 DESCRIPTION

Net::HTTP::Knork::R
hen the body is sets for the first time.

=item content_type

    $res->content_type('application/json');
    my $ct = $res->content_type;

Gets or sets the content type of the response body

=item co
ype' => 'application/json']);

Gets or sets HTTP response headers.

=item header

    my $cl = $res->header('Content-Length');
    $res->header('Content-Type' => 'application/json');

Shortcut for C<<

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