I am building a rest API in ASP.NET Core 6.0
I am using several API’s for a mashup, in which one of them demands that I set a "meaningful" user-agent. Can someone explain where (in which class or something) in the project I put the HttpRequest.UserAgent property and how exactly. I’ve been trying to search for a good explanation but it doesn’t make sense to me.
the api I’m using is musicbrainz, in which i want the user-agent to look something like this:
MyAwesomeTagger/1.2.0 ( [email protected] )
Thank you for any help.
2
Answers
Thank you for a quick response in the comments - does this look right?
You should add user agent in UserAgent property of DefaultRequestHeader