Add project files

This commit is contained in:
Sean Greenawalt 2025-05-10 05:16:40 -04:00
commit 8cf01ead74
Signed by: seang96
GPG key ID: 504F02B511005571
40 changed files with 3967 additions and 0 deletions

View file

@ -0,0 +1,23 @@
using System.Net.Http.Headers;
namespace AdOrbitSDK;
public partial class Client
{
private readonly string _apiKey;
public Client(HttpClient httpClient, string apiKey)
: this(httpClient)
{
_apiKey = apiKey;
}
partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url)
{
if (client.BaseAddress == null) throw new NullReferenceException("Base address cannot be null");
var authHeader = new AuthenticationHeaderValue("Bearer", _apiKey);
request.Headers.Authorization = authHeader;
}
}