util/srv/client.go
func Send(req *http.Request) (*Response, error) {
	client := &http.Client{}

	resp, err := client.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	var resp2 Response
	if err = json.NewDecoder(resp.Body).Decode(&resp2); err != nil {
		return nil, err
	}

	return &resp2, nil
}
func Send(req *http.Request) (*Response, error) {
	client := &http.Client{}

	resp, err := client.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	var resp2 Response
	if err = json.NewDecoder(resp.Body).Decode(&resp2); err != nil {
		return nil, err
	}

	return &resp2, nil
}
func Send ( req * http . Request ) ( * Response , error ) { client := & http . Client { } resp , err := client . Do ( req ) if err != nil { return nil , err } defer resp . Body . Close ( ) var resp2 Response if err = json . NewDecoder ( resp . Body ) . Decode ( & resp2 ) ; err != nil { return nil , err } return & resp2 , nil }
// Send sends an HTTP request and returns a server response.
Send sends an HTTP request and returns a server response .