Add support for simpler HTTP requests
theolivenbaum opened this issue · comments
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.
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