Tools for spying on connections, all output read/written to stderr
A http.Client
suitable for debugging, writes all http data to stdout.
client := connspy.NewClient(nil, nil)
resp, _ := client.Get("http://example.com/")
// ensure all of the body is read
ioutil.ReadAll(resp.Body)
resp.Body.Close()
resp, _ = client.Get("https://example.com/")
ioutil.ReadAll(resp.Body)
resp.Body.Close()
Provides a net.Conn
wrapper that writes all reads/writes to stderr.
https://medium.com/@j0hnsmith/eavesdrop-on-a-golang-http-client-c4dc49af9d5e