canton7 / RestEase

Easy-to-use typesafe REST API client library for .NET Standard 1.1 and .NET Framework 4.5 and higher, which is simple and customisable. Inspired by Refit
MIT License
1.08k stars 109 forks source link

Receiving headers from the server #168

Closed mnkvsoft closed 4 years ago

mnkvsoft commented 4 years ago

Good afternoon. Is there some way to get the header from the server?

canton7 commented 4 years ago

Make the method return a HttpResponseMessage or Response<T> (which has a ResponseMessage property which contains the HttpResponseMessage). From there you can get Headers and Content.Headers

mnkvsoft commented 4 years ago

Thanks for the quick response