feat: don't return 200 for deleted workspaces (#1556)

This commit is contained in:
Dean Sheather
2022-05-20 00:29:10 +10:00
committed by GitHub
parent eb8f371f34
commit 4eb0bb6afd
5 changed files with 109 additions and 1 deletions
+8
View File
@@ -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) {