Skip to content

Commit

Permalink
client: export method runRawRequestWithHeaders (#167)
Browse files Browse the repository at this point in the history
This enables clients to submit multipart payloads
that aren't supported within the runRequestWithMultipartPayloadWithHeaders method.
  • Loading branch information
joelrebel authored Mar 11, 2022
1 parent 70dde36 commit 6072260
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ func (c *APIClient) runRawRequest(method, url string, payloadBuffer io.ReadSeeke
return c.runRawRequestWithHeaders(method, url, payloadBuffer, contentType, nil)
}

// RunRawRequestWithHeaders actually performs the REST calls but allowing custom headers
func (c *APIClient) RunRawRequestWithHeaders(method, url string, payloadBuffer io.ReadSeeker, contentType string, customHeaders map[string]string) (*http.Response, error) {
return c.runRawRequestWithHeaders(method, url, payloadBuffer, contentType, customHeaders)
}

// runRawRequestWithHeaders actually performs the REST calls but allowing custom headers
func (c *APIClient) runRawRequestWithHeaders(method, url string, payloadBuffer io.ReadSeeker, contentType string, customHeaders map[string]string) (*http.Response, error) {
if url == "" {
Expand Down

0 comments on commit 6072260

Please sign in to comment.