// SendRequest sends a HTTP request according to provided method and url.
SendRequest sends a HTTP request according to provided method and url.
// SendRequest sends a HTTP request according to provided method and url .
func sendRequest(m, u string, h map[string]string, c *http.Client) (*http.Response, []byte, error) {
	req, err := createRequest(m, u, h)
	if err != nil {
		return nil, nil, err
	}
	resp, err := c.Do(req)
	if err != nil {
		return resp, nil, err
	}
	defer resp.Body.Close()
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return resp, nil, err
	}
	return resp, body, nil
}
func sendRequest ( m , u string , h map [ string ] string , c * http . Client ) ( * http . Response , [ ] byte , error ) { req , err := createRequest ( m , u , h ) if err != nil { return nil , nil , err } resp , err := c . Do ( req ) if err != nil { return resp , nil , err } defer resp . Body . Close ( ) body , err := ioutil . ReadAll ( resp . Body ) if err != nil { return resp , nil , err } return resp , body , nil }
SendRequest sends a HTTP request according to provided method and url.
SendRequest sends a HTTP request according to provided method and url .