unixtransport

Support for Unix domain sockets in Go HTTP clients

APACHE-2.0 License

Stars
79
Committers
2

unixtransport Go Reference Latest Release Tests

This package adds support for Unix domain sockets in Go HTTP clients.

t := &http.Transport{...}

unixtransport.Register(t)

client := &http.Client{Transport: t}

Now you can make requests with URLs like this:

resp, err := client.Get("https+unix:///path/to/socket:/request/path?a=b")

Use scheme http+unix or https+unix.

Inspiration taken from, and thanks given to, both tv42/httpunix and agorman/httpunix.