code: func executeHTTPRequest(ctx *context.Context, put *config.Put, req *h.Request, check ResponseChecker) (*h.Response, error) {
  	client, err := getHTTPClient(put)
  	if err != nil {
  		return nil, err
  	}
  	log.Debugf("executing request: %s %s (headers: %v)", req.Method, req.URL, req.Header)
  	resp, err := client.Do(req)
  	if err != nil {
  		// If we got an error, and the context has been canceled,
  		// the context's error is probably more useful.
  		select {
  		case <-ctx.Done():
  			return nil, ctx.Err()
  		default:
  		}
  		return nil, err
  	}
  
  	defer resp.Body.Close() // nolint: errcheck
  
  	err = check(resp)
  	if err != nil {
  		// even though there was an error, we still return the response
  		// in case the caller wants to inspect it further
  		return resp, err
  	}
  
  	return resp, err
  }
docs: // executeHTTPRequest processes the http call with respect of context ctx