Skip to content

Commit c0e3c14

Browse files
feat(client): send User-Agent header
1 parent 77ed083 commit c0e3c14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ArcadeDotnet/Core/ParamsBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ static ParamsBase()
2020
var runtime = GetRuntime();
2121
s_defaultHeaders = new Dictionary<string, string>
2222
{
23+
["User-Agent"] = GetUserAgent(),
2324
["X-Stainless-Arch"] = GetOSArch(),
2425
["X-Stainless-Lang"] = "csharp",
2526
["X-Stainless-OS"] = GetOS(),
@@ -195,6 +196,8 @@ protected static void AddDefaultHeaders(HttpRequestMessage request, ClientOption
195196
}
196197
}
197198

199+
static string GetUserAgent() => $"{typeof(ArcadeClient).Name}/C# {GetPackageVersion()}";
200+
198201
static string GetOSArch() =>
199202
RuntimeInformation.OSArchitecture switch
200203
{

0 commit comments

Comments
 (0)