You can work with a web server living in a file socket with linux commands:
# /bin/echo -e "GET /containers/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock ; echo ''
HTTP/1.0 200 OK
Content-Type: application/json
Date: Sun, 03 Jan 2016 23:31:54 GMT
Content-Length: 2
[]
#
How can I do the same with Perl modules? I would prefer to do the same with HTTP :: Tiny , but I cannot figure out how to use it with a file socket.
Right now I just use perl system(), but I want to use HTTP :: Tiny to make the code simpler.
source
share