Skip to content

Commit 6ca1a67

Browse files
committed
added user agent
1 parent a99a548 commit 6ca1a67

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

NetoDotNET/API/RestClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public HttpRequestMessage PrepareHTTPMessage(HttpMethod method, string netoActio
4646
requestMessage.Headers.Add("Accept", "application/json");
4747
requestMessage.Content = new StringContent(body, Encoding.UTF8, "application/json");
4848

49+
requestMessage.Headers.Add("User-Agent", "NetoDotNET");
50+
4951
requestMessage.RequestUri = _url;
5052
requestMessage.Method = method;
5153
return requestMessage;

NetoDotNET/Resources/NetoResourceBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ protected Uri BuildURI(string resourceEndpoint)
3232
throw new ArgumentException("Resource base endpoint not found", nameof(resourceEndpoint));
3333
}
3434

35+
// TODO: Add support for store dns name
3536
return new Uri($"https://{_storeConfiguration.StoreName}.neto.com.au{_storeConfiguration.BaseEndpoint}");
3637
}
3738

NetoDotNET/Store/StoreConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,5 @@ public StoreConfiguration(string storeName, string APIKey, string username, stri
4848
this._username = username;
4949
this._baseEndpoint = baseEndpoint;
5050
}
51-
52-
5351
}
5452
}

0 commit comments

Comments
 (0)