mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-05-10 01:48:22 +00:00
Add DoCustomRequestV5
This commit is contained in:
parent
2afac57e29
commit
7bc894763c
1 changed files with 10 additions and 0 deletions
10
api/api.go
10
api/api.go
|
@ -26,12 +26,22 @@ type APIHeader struct {
|
|||
}
|
||||
|
||||
// DoCustomRequest Executes a Custom Request and returns a APIResponse
|
||||
//
|
||||
// Deprecated: DoCustomRequest is deprecated. Use DoCustomRequestV5 instead
|
||||
func (c *Client) DoCustomRequest(ctx context.Context, method, path, version string, body interface{}, opts interface{}) (*APIResponse, error) {
|
||||
_, response, err := c.DoCustomRequestAndReturnRawResponse(ctx, method, path, version, body, opts)
|
||||
return response, err
|
||||
}
|
||||
|
||||
// DoCustomRequestV5 Executes a Custom Request and returns a APIResponse
|
||||
func (c *Client) DoCustomRequestV5(ctx context.Context, method, path string, body interface{}, opts interface{}) (*APIResponse, error) {
|
||||
_, response, err := c.DoCustomRequestAndReturnRawResponseV5(ctx, method, path, body, opts)
|
||||
return response, err
|
||||
}
|
||||
|
||||
// DoCustomRequestAndReturnRawResponse Executes a Custom Request and returns a APIResponse and the Raw HTTP Response
|
||||
//
|
||||
// Deprecated: DoCustomRequestAndReturnRawResponse is deprecated. Use DoCustomRequestAndReturnRawResponseV5 instead
|
||||
func (c *Client) DoCustomRequestAndReturnRawResponse(ctx context.Context, method, path, version string, body interface{}, opts interface{}) (*http.Response, *APIResponse, error) {
|
||||
// version is no longer used and is ignored.
|
||||
return c.DoCustomRequestAndReturnRawResponseV5(ctx, method, path, body, opts)
|
||||
|
|
Loading…
Add table
Reference in a new issue