Skip to content

Commit

Permalink
chore: add user agent for other http client (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Oct 26, 2023
1 parent 242b8ef commit 8a7b17b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/utils/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func JsonResponse[T any](ctx context.Context, method, url string, reqBody any, r
return nil, err
}
}
req.Header.Set("User-Agent", "SupabaseCLI/"+Version)
// Sends request
resp, err := httpClient.Do(req)
if err != nil {
Expand Down Expand Up @@ -68,6 +69,7 @@ func TextResponse(ctx context.Context, method, url string, body io.Reader, reqEd
return "", err
}
}
req.Header.Set("User-Agent", "SupabaseCLI/"+Version)
// Sends request
resp, err := httpClient.Do(req)
if err != nil {
Expand Down

0 comments on commit 8a7b17b

Please sign in to comment.