/unixtransport

Support for Unix domain sockets in Go HTTP clients

Primary LanguageGoApache License 2.0Apache-2.0

unixtransport Go Reference 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.