HTTP::Tiny::UNIX - A subclass of HTTP::Tiny to connect to HTTP server over Unix socket
This document describes version 0.051 of HTTP::Tiny::UNIX (from Perl distribution HTTP-Tiny-UNIX), released on 2018-05-08.
use HTTP::Tiny::UNIX; my $response = HTTP::Tiny::UNIX->new->get('http:/path/to/unix.sock//uri/path'); die "Failed!\n" unless $response->{success}; print "$response->{status} $response->{reason}\n"; while (my ($k, $v) = each %{$response->{headers}}) { for (ref $v eq 'ARRAY' ? @$v : $v) { print "$k: $_\n"; } } print $response->{content} if length $response->{content};
This is a subclass of HTTP::Tiny to connect to HTTP server over Unix socket. URL syntax is "http:" + path to unix socket + "/" + uri path. For example: http:/var/run/apid.sock//api/v1/matches. URL not matching this pattern will be passed to HTTP::Tiny.
"http:"
"/"
http:/var/run/apid.sock//api/v1/matches
Proxy is currently not supported.
Please visit the project's homepage at https://metacpan.org/release/HTTP-Tiny-UNIX.
Source repository is at https://github.com/perlancar/perl-HTTP-Tiny-UNIX.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny-UNIX
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
HTTP::Tiny
To use LWP to connect over Unix sockets, see LWP::Protocol::http::SocketUnixAlt.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018, 2014 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install HTTP::Tiny::UNIX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Tiny::UNIX
CPAN shell
perl -MCPAN -e shell install HTTP::Tiny::UNIX
For more information on module installation, please visit the detailed CPAN module installation guide.