func (c *Client) MakeRequest(ctx context.Context, method string, pathPart string, data url.Values, v interface{}) error {
	if !strings.HasPrefix(pathPart, "/"+c.APIVersion) {
		pathPart = c.FullPath(pathPart)
	}
	rb := new(strings.Reader)
	if data != nil && (method == "POST" || method == "PUT") {
		rb = strings.NewReader(data.Encode())
	}
	if method == "GET" && data != nil {
		pathPart = pathPart + "?" + data.Encode()
	}
	req, err := c.NewRequest(method, pathPart, rb)
	if err != nil {
		return err
	}
	req = withContext(req, ctx)
	if ua := req.Header.Get("User-Agent"); ua == "" {
		req.Header.Set("User-Agent", userAgent)
	} else {
		req.Header.Set("User-Agent", userAgent+" "+ua)
	}
	return c.Do(req, &v)
}
func (c *Client) MakeRequest(ctx context.Context, method string, pathPart string, data url.Values, v interface{}) error {
	if !strings.HasPrefix(pathPart, "/"+c.APIVersion) {
		pathPart = c.FullPath(pathPart)
	}
	rb := new(strings.Reader)
	if data != nil && (method == "POST" || method == "PUT") {
		rb = strings.NewReader(data.Encode())
	}
	if method == "GET" && data != nil {
		pathPart = pathPart + "?" + data.Encode()
	}
	req, err := c.NewRequest(method, pathPart, rb)
	if err != nil {
		return err
	}
	req = withContext(req, ctx)
	if ua := req.Header.Get("User-Agent"); ua == "" {
		req.Header.Set("User-Agent", userAgent)
	} else {
		req.Header.Set("User-Agent", userAgent+" "+ua)
	}
	return c.Do(req, &v)
}
func ( c * Client ) MakeRequest ( ctx context . Context , method string , pathPart string , data url . Values , v interface { } ) error { if ! strings . HasPrefix ( pathPart , " " + c . APIVersion ) { pathPart = c . FullPath ( pathPart ) } rb := new ( strings . Reader ) if data != nil && ( method == " " || method == " " ) { rb = strings . NewReader ( data . Encode ( ) ) } if method == " " && data != nil { pathPart = pathPart + " " + data . Encode ( ) } req , err := c . NewRequest ( method , pathPart , rb ) if err != nil { return err } req = withContext ( req , ctx ) if ua := req . Header . Get ( " " ) ; ua == " " { req . Header . Set ( " " , userAgent ) } else { req . Header . Set ( " " , userAgent + " " + ua ) } return c . Do ( req , & v ) }
// Make a request to the Twilio API.
Make a request to the Twilio API .