yanpaulo / RestHttpClient

Simple and flexible REST client built on top of Microsoft's System.Net.HttpClient.
10 stars 1 forks source link

Auth & Error handlers on HttpMessageHandler #9

Closed yanpaulo closed 5 years ago

yanpaulo commented 5 years ago

Would it be best if AuthenticationHandlerand ErrorHandler were in the HttpMessageHandler instead of being in the RestHttpClient class?

This way HttpMessageHandler's SendAsync() implementation would take place of RestHttpClient's RestSendAsync(HttpRequestMessage) method and hence it would be more flexible to the developer (say, if he/she only wants the auth & error handling on a regular Httpclient for example).

Of course this would break a lot of stuff in the actual (0.5.0) version.

yanpaulo commented 5 years ago

Done as of 0680f7f0df420e11ccf27223260de49650ce70b3