Skip to content

Commit 741f27d

Browse files
authored
Add version header (#36)
1 parent 09d5202 commit 741f27d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/stream-net/StreamClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace Stream
1111
{
1212
public class StreamClient : IStreamClient
1313
{
14+
readonly string Version = "3.0.0";
15+
1416
internal const string BaseUrlFormat = "https://{0}-api.stream-io-api.com";
1517
internal const string BaseUrlPath = "/api/v1.0/";
1618
internal const string BasePersonalizationUrlFormat = "https://{0}-personalization.stream-io-api.com";
@@ -179,7 +181,8 @@ private RestRequest BuildRestRequest(string fullPath, HttpMethod method, string
179181
{
180182
var request = new RestRequest(fullPath, method);
181183
request.AddHeader("Authorization", JWToken("*", userID));
182-
request.AddHeader("stream-auth-type", "jwt");
184+
request.AddHeader("Stream-Auth-Type", "jwt");
185+
request.AddHeader("X-Stream-Client", "stream-csharp-"+Version);
183186
request.AddQueryParameter("api_key", _apiKey);
184187
return request;
185188
}

0 commit comments

Comments
 (0)