Perform an HTTP GET "/" over the unix socket at the given path.
(path string)
| 62 | |
| 63 | // Perform an HTTP GET "/" over the unix socket at the given path. |
| 64 | func httpGetOverUnixSocket(path string) error { |
| 65 | dial := func(_ context.Context, network, addr string) (net.Conn, error) { |
| 66 | return net.Dial("unix", path) |
| 67 | } |
| 68 | |
| 69 | client := &http.Client{Transport: &http.Transport{DialContext: dial}} |
| 70 | _, err := client.Get("http://unix.socket/") |
| 71 | return err |
| 72 | } |
| 73 | |
| 74 | // Perform an HTTP GET "/" over TLS, using the given network address and server |
| 75 | // certificate. |
no test coverage detected
searching dependent graphs…