Closed theolivenbaum closed 2 years ago
I would rather recommend implementing the .NET http client patterns:
Much more compatible with existing .NET code, and can also be written as oneliners async/await for getting data.
True! And simple enough to hide the abstraction! Will give it some thought
On Thu, Mar 25, 2021, 9:35 PM Christian Myhre Lundheim < @.***> wrote:
I would rather recommend implementing the .NET http client patterns:
- HttpClient
- IHttpClientFactory
- The extension methods for JSON etc.
Much more compatible with existing .NET code, and can also be written as oneliners async/await for getting data.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theolivenbaum/h5/issues/35#issuecomment-807437369, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDCOAZVXOT2S47OPTAZVE3TFOM7RANCNFSM4ZXUSRAA .
I have implemented dependency injection patterns, and an API-client that is very easy to use in my library for Bridge.NET: https://github.com/ChrML/Bridge.Jolt
I think this front-end library has very many great ideas in one place for very simple front-end development, but it will eventually have to be ported to H5.
Not come around for the HttpClient part yet. But it makes sense that System.Net.Http is a part of H5's core features, since it's used a lot in frontends, and also a part of standard .NET.
Nice!
If you want to try porting, the effort will be a simple find and replace:
Bridge -> H5 Retyped -> H5.Core
And fully replacing the csproj file with a modern one with the right Nuget packages.
Closed with initial implementation in PR #61
Idea: https://github.com/mikeal/bent