GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::Tiny::UNIX(3) User Contributed Perl Documentation HTTP::Tiny::UNIX(3)

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.

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.

2018-05-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.