Add user-agent to all http clients using RawClientHttpRequestSettings. (#3115)

This commit is contained in:
Tingluo Huang
2024-01-30 13:39:41 -05:00
committed by GitHub
parent dcb790f780
commit 7414e08fbd
4 changed files with 30 additions and 3 deletions

View File

@@ -1,12 +1,11 @@
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
namespace GitHub.Services.Common.Internal
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class RawHttpHeaders
{
public const String SessionHeader = "X-Runner-Session";
public const String SessionHeader = "X-Actions-Session";
}
}

View File

@@ -138,6 +138,8 @@ namespace GitHub.Services.Common
response.Dispose();
}
this.Settings.ApplyTo(request);
// Let's start with sending a token
IssuedToken token = null;
if (m_tokenProvider != null)