wis3guy / HalClient.Net

A library that simplifies interaction with API's that respond with the "application\hal+json" media type.
Microsoft Public License
19 stars 21 forks source link

Improve the API specific client support #11

Open wis3guy opened 8 years ago

wis3guy commented 8 years ago

Right now you can use an override/implementation of the Decorate method to return a custom client type. This works, but the factory will always yield an IHalHttpClient instance. You can only expose custom methods on it by creating extension methods. While this works great in most cases, it falls apart when a consumer has to communicate with multiple HAL based API's and thus uses multiple both decorated and non-decorated clients. Extensions methods are bound to the interface, and will thus be bound to all instantiated clients.