Skip to content

Support for Unix domain sockets in Go HTTP clients

License

Notifications You must be signed in to change notification settings

peterbourgon/unixtransport

Repository files navigation

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.

About

Support for Unix domain sockets in Go HTTP clients

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages