From 8a7b17b8cc5c217c128c67bfa7e5474949c03637 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Thu, 26 Oct 2023 10:59:22 +0800 Subject: [PATCH] chore: add user agent for other http client (#1614) --- internal/utils/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/utils/http.go b/internal/utils/http.go index 91fa0270c..b4648bc98 100644 --- a/internal/utils/http.go +++ b/internal/utils/http.go @@ -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 { @@ -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 {