1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# unixtransport [](https://pkg.go.dev/github.com/peterbourgon/unixtransport)  
This package adds support for Unix domain sockets in Go HTTP clients.
```go
t := &http.Transport{...}
unixtransport.Register(t)
client := &http.Client{Transport: t}
```
Now you can make requests with URLs like this:
```go
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](https://github.com/tv42/httpunix) and
[agorman/httpunix](https://github.com/agorman/httpunix).
|