refit
refit copied to clipboard
[BUG] Http 301 Response
Describe the bug
Actually this is more a question than a BUG. I'm already using Refit in this project on another service and it's looking good. But now I have to implement something new. I'm getting HTTP 301 as a response from Refit and that's my problem. I've tried to search for 301 Http response on refit but didnt find anything. Doing the same post through postman it works but not on Refit service. I've double check everything, headers, request body and it's all the same. Might be some refit bug? Am I missing something ?
thanks
Steps To Reproduce
Expected behavior
Screenshots
Environment
- OS:
- Device:
- Version:
- Working Version:
Additional context
The result of the request returns null
Hey there, is the endpoint uri something that from a DNS point of view will permanently redirect?
Http 301 = Moved Permanently. So for example you're hitting www.example.org the DNS may re-route you elsewhere.
Now the question here is whether REFIT gracefully handles an "AllowAutoRedirect" set by System.Net.Http. See https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.allowautoredirect?view=net-6.0
Hopefully this helps a little bit.
Gets or sets a value that indicates whether the handler should follow redirection responses.