[Solved] Go net/http request [duplicate]
You seem to want to POST a query, which would be similar to this answer: import ( “bytes” “fmt” “io/ioutil” “net/http” ) func main() { url := “http://xxx/yyy” fmt.Println(“URL:>”, url) var query = []byte(`your query`) req, err := http.NewRequest(“POST”, url, bytes.NewBuffer(query)) req.Header.Set(“X-Custom-Header”, “myvalue”) req.Header.Set(“Content-Type”, “text/plain”) client := &http.Client{} resp, err := client.Do(req) if err != … Read more