mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: don't return 200 for deleted workspaces (#1556)
This commit is contained in:
@@ -36,6 +36,14 @@ type Client struct {
|
||||
|
||||
type requestOption func(*http.Request)
|
||||
|
||||
func queryParam(k, v string) requestOption {
|
||||
return func(r *http.Request) {
|
||||
q := r.URL.Query()
|
||||
q.Set(k, v)
|
||||
r.URL.RawQuery = q.Encode()
|
||||
}
|
||||
}
|
||||
|
||||
// Request performs an HTTP request with the body provided.
|
||||
// The caller is responsible for closing the response body.
|
||||
func (c *Client) Request(ctx context.Context, method, path string, body interface{}, opts ...requestOption) (*http.Response, error) {
|
||||
|
||||
Reference in New Issue
Block a user