Skip to content

Commit

Permalink
Merge pull request #1068 from 23doors/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Aug 30, 2022
2 parents 0dc767b + 8917e44 commit aed1b76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/1068.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
api: addded context and headers to Raw method
```
4 changes: 2 additions & 2 deletions cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit aed1b76

Please sign in to comment.