You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having request headers in the SDKs will help us in monitoring which SDK is mostly used by the community and customers. It will help us make the decisions in the future on which SDKs to officially support in the future.
The text was updated successfully, but these errors were encountered:
The current ticket provides incorrect instructions for setting the User-Agent header in HTTP requests that won't work for the Http
System.AggregateExceptionOne or more errors occurred.(Theformat of value 'novu/novu-dotnet@0.0.0' is invalid.)(Theformat of value 'novu/novu-dotnet@0.0.0' is invalid.)
Exception doesn't have a stacktrace
System.FormatException
The format of value 'novu/novu-dotnet@0.0.0' is invalid.
at System.Net.Http.Headers.HttpHeaderParser.ParseValue(Stringvalue,ObjectstoreValue,Int32&index)
at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptordescriptor,HeaderStoreItemInfoinfo,Stringvalue)
at System.Net.Http.Headers.HttpHeaders.Add(HeaderDescriptordescriptor,Stringvalue)
Why the Instruction is Wrong
Invalid User-Agent Format: The User-Agent header should follow a standard format. Using novu/[email protected] is invalid due to the @ symbol and four-segment version, which do not comply with HTTP standards.
Correct Solution
This will work:
novu-dotnet/{nuget file version}
Implementation Steps
To correctly retrieve the version:
usingSystem.Reflection;varversion=Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion??"0.0.0";// allow for detection of developersvaruserAgent=$"novu-dotnet/{version}";
Add the user-agent request header to every call in this sdk.
Example:
headers: {
Authorization:
Bearer ${ApiKey}
,"User-Agent":
novu/${sdk}@${version}
,},
Why? (Context)
Having request headers in the SDKs will help us in monitoring which SDK is mostly used by the community and customers. It will help us make the decisions in the future on which SDKs to officially support in the future.
The text was updated successfully, but these errors were encountered: