MCPcopy Index your code
hub / github.com/coder/coder / Request

Method Request

codersdk/client.go:220–223  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

218// Request performs a HTTP request with the body provided. The caller is
219// responsible for closing the response body.
220func (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.

Callers 15

CreateUserSecretMethod · 0.95
UserSecretsMethod · 0.95
UserSecretByNameMethod · 0.95
UpdateUserSecretMethod · 0.95
DeleteUserSecretMethod · 0.95
CreateProvisionerKeyMethod · 0.95
ListProvisionerKeysMethod · 0.95
GetProvisionerKeyMethod · 0.95
DeleteProvisionerKeyMethod · 0.95

Calls 2

AsRequestOptionMethod · 0.65