Golang: HTTP Client & Server with Query Params

Client func TestDelete(id string, registered bool) { path := “http://localhost:8085/v1/shops” // Create client client := &http.Client{} // Create request req, err := http.NewRequest(“DELETE”, path, nil) if err != nil { fmt.Println(err) return } q := req.URL.Query() q.Add(“id”, r.UID) q.Add(“registered”, strconv.FormatBool(registered)) req.URL.RawQuery = q.Encode() fmt.Println(req.URL.String()) // Fetch Request resp, […]