NAME
Mojo::UserAgent::UnixSocket - User Agent connections over UNIX sockets.
VERSION
0.01
SYNOPSIS
use Mojo::UserAgent::UnixSocket;
my $ua = Mojo::UserAgent::UnixSocket->new;
say $ua->get('unix:///var/run/docker.sock/images/json?all=true')->res->body;
DESCRIPTION
Mojo::UserAgent::UnixSocket transparently enables Mojo::UserAgent to interact with services listening on Unix domain sockets.
Any invocation that works with Mojo::UserAgent should also work here.
It expects URLs in the following format (the .sock is required, pending a clever patch):
unix://<path-to-socket>.sock/<url-path>
For example, talking to the Docker daemon, whose socket is (typically) located at /var/run/docker.sock
:
unix:///var/run/docker.sock/images/nginx/json