Skip to content

Commit 433f1b1

Browse files
committed
chore(User-Agent): Updated user-agent to include environment information
1 parent e0f47d5 commit 433f1b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/IBM.WatsonDeveloperCloud/Http/HttpFactory.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ public static HttpRequestMessage GetRequestMessage(HttpMethod method, Uri resour
4545

4646
// add default headers
4747
request.Headers.Add("accept", formatters.SelectMany(p => p.SupportedMediaTypes).Select(p => p.MediaType));
48-
request.Headers.Add("User-Agent", Constants.SDK_VERSION);
48+
request.Headers.Add("User-Agent",
49+
string.Format(
50+
"{0} {1} {2}",
51+
Constants.SDK_VERSION,
52+
System.Runtime.InteropServices.RuntimeInformation.OSDescription,
53+
System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
54+
));
4955

5056
return request;
5157
}

0 commit comments

Comments
 (0)