Request performs a HTTP request with the body provided. The caller is responsible for closing the response body.
(ctx context.Context, method, path string, body interface{}, opts ...RequestOption)
| 218 | // Request performs a HTTP request with the body provided. The caller is |
| 219 | // responsible for closing the response body. |
| 220 | func (c *Client) Request(ctx context.Context, method, path string, body interface{}, opts ...RequestOption) (*http.Response, error) { |
| 221 | opts = append([]RequestOption{c.SessionTokenProvider.AsRequestOption()}, opts...) |
| 222 | return c.RequestWithoutSessionToken(ctx, method, path, body, opts...) |
| 223 | } |
| 224 | |
| 225 | // RequestWithoutSessionToken performs a HTTP request. It is similar to Request, but does not set |
| 226 | // the session token in the request header, nor does it make a call to the SessionTokenProvider. |