I have an ASP.NET WebApi 2 application . I added Swashbuckle (Swagger for .NET). I run the application and go to localhost: 8000 / swagger. This request has StatusCode 301 and redirects me to localhost: 8000 / swagger / ui / index. This request has a StatusCode 200 , but HttpResponseMessage.RequestMessage is NULL. I want to register where the request is coming from, so I want to register HttpResponseMessage.RequestMessage.RequestUri .
Why is RequestMessage null? Is this because the previous request is a redirect? Is there any other way to get RequestUri?
Marta source
share