diff --git a/.changelog/1068.txt b/.changelog/1068.txt new file mode 100644 index 00000000000..fa7259c79ad --- /dev/null +++ b/.changelog/1068.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +api: addded context and headers to Raw method +``` diff --git a/cloudflare.go b/cloudflare.go index c14990dcc7e..b41550e1235 100644 --- a/cloudflare.go +++ b/cloudflare.go @@ -473,8 +473,8 @@ type RawResponse struct { // Raw makes a HTTP request with user provided params and returns the // result as untouched JSON. -func (api *API) Raw(method, endpoint string, data interface{}) (json.RawMessage, error) { - res, err := api.makeRequest(method, endpoint, data) +func (api *API) Raw(ctx context.Context, method, endpoint string, data interface{}, headers http.Header) (json.RawMessage, error) { + res, err := api.makeRequestContextWithHeaders(ctx, method, endpoint, data, headers) if err != nil { return nil, err }