rpc.go
func (r rpc) createRequest(method string, endpoint string, params []byte) (*http.Request, error) {

	endpoint = r.auth.getBaseUrl() + endpoint //BaseUrl depends on Auth type used

	req, err := http.NewRequest(method, endpoint, bytes.NewBuffer(params))
	if err != nil {
		return nil, err
	}

	// Authenticate the request
	r.auth.authenticate(req, endpoint, params)

	req.Header.Set("User-Agent", "CoinbaseGo/v1")
	req.Header.Set("Content-Type", "application/json")

	return req, nil
}
func (r rpc) createRequest(method string, endpoint string, params []byte) (*http.Request, error) {

	endpoint = r.auth.getBaseUrl() + endpoint //BaseUrl depends on Auth type used

	req, err := http.NewRequest(method, endpoint, bytes.NewBuffer(params))
	if err != nil {
		return nil, err
	}

	// Authenticate the request
	r.auth.authenticate(req, endpoint, params)

	req.Header.Set("User-Agent", "CoinbaseGo/v1")
	req.Header.Set("Content-Type", "application/json")

	return req, nil
}
// CreateRequest formats a request with all the necessary headers