Skip to content

Commit a6d9731

Browse files
refactor(internal): default headers
1 parent 7aac0ab commit a6d9731

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Stagehand/Core/ParamsBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ internal static void AddDefaultHeaders(HttpRequestMessage request, ClientOptions
216216

217217
static string GetUserAgent() => $"{typeof(StagehandClient).Name}/C# {GetPackageVersion()}";
218218

219+
static string GetPackageVersion() =>
220+
Assembly
221+
.GetExecutingAssembly()
222+
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
223+
?.InformationalVersion
224+
?? "unknown";
225+
219226
static string GetOSArch() =>
220227
RuntimeInformation.OSArchitecture switch
221228
{
@@ -250,13 +257,6 @@ static string GetOS()
250257
return $"Other:{RuntimeInformation.OSDescription}";
251258
}
252259

253-
static string GetPackageVersion() =>
254-
Assembly
255-
.GetExecutingAssembly()
256-
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
257-
?.InformationalVersion
258-
?? "unknown";
259-
260260
static Runtime GetRuntime()
261261
{
262262
var runtimeDescription = RuntimeInformation.FrameworkDescription;

0 commit comments

Comments
 (0)