[suggestion] Add ctor to ReseEase that allow to add both RequestModifier and HttpMessageHandler #231
Replies: 2 comments
-
However, As a workaround, you should be able to do something like: var clientHandler = ModifyingClientHandler(proxyHandler) { InnerHandler = retryPolicyHandler };
var client = RestClient.For<T>(clientHandler); |
Beta Was this translation helpful? Give feedback.
-
Many thanks, i didn't know the EDIT All works as expected, now my code is like that:
|
Beta Was this translation helpful? Give feedback.
-
As explained in the title i'm in the following situation:
But when i try to inizialize RestEase i cannot add both to the ctor (even if i use new RestClient(...)) and i need to choose only one of the 2 following ctors:
RestClient.For<IWebApi>(API_URL, proxyHandler);
(ctor that accept RequestModifier)RestClient.For<IWebApi>(API_URL, retryPolicyHandler);
(ctor that accept HttpMessageHandler)There are not public members that allow me to edit that configuration in a second time because HttpClient is a private property (as it should be).
Thanks and sorry for my bad english :)
L-
Beta Was this translation helpful? Give feedback.
All reactions