My application is rejecting this, but when I curl the data it is working, so it seems there is somewhere that I am confused with how to compress this http payload in Go.
var buf bytes.Buffer
g := gzip.NewWriter(&buf)
g.Write([]byte("apples")
req, err := http.NewRequest("POST", q.host, bytes.NewReader(buf.Bytes()))
...
req.Header.Set("Content-Type", "text/plain")
req.Header.Set("Content-Encoding", "gzip")
resp, err := client.Do(req)
Does someone see where I am going wrong?