Skip to content

Commit

Permalink
backport of commit fada2d0 (#20498)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
  • Loading branch information
1 parent cf2f081 commit 11e504d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,9 @@ func (c *Client) NewRequest(method, requestPath string) *Request {
// a Vault server not configured with this client. This is an advanced operation
// that generally won't need to be called externally.
//
// Deprecated: This method should not be used directly. Use higher level
// methods instead.
// Deprecated: RawRequest exists for historical compatibility and should not be
// used directly. Use client.Logical().ReadRaw(...) or higher level methods
// instead.
func (c *Client) RawRequest(r *Request) (*Response, error) {
return c.RawRequestWithContext(context.Background(), r)
}
Expand All @@ -1278,8 +1279,9 @@ func (c *Client) RawRequest(r *Request) (*Response, error) {
// a Vault server not configured with this client. This is an advanced operation
// that generally won't need to be called externally.
//
// Deprecated: This method should not be used directly. Use higher level
// methods instead.
// Deprecated: RawRequestWithContext exists for historical compatibility and
// should not be used directly. Use client.Logical().ReadRawWithContext(...)
// or higher level methods instead.
func (c *Client) RawRequestWithContext(ctx context.Context, r *Request) (*Response, error) {
// Note: we purposefully do not call cancel manually. The reason is
// when canceled, the request.Body will EOF when reading due to the way
Expand Down

0 comments on commit 11e504d

Please sign in to comment.