Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for simpler HTTP requests #35

Closed
theolivenbaum opened this issue Mar 24, 2021 · 5 comments
Closed

Add support for simpler HTTP requests #35

theolivenbaum opened this issue Mar 24, 2021 · 5 comments

Comments

@theolivenbaum
Copy link
Collaborator

theolivenbaum commented Mar 24, 2021

Idea: https://github.com/mikeal/bent

@theolivenbaum theolivenbaum changed the title Add support for something like Bent Add support for simpler HTTP requests Mar 24, 2021
@ChrML
Copy link

ChrML commented Mar 25, 2021

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.

@theolivenbaum
Copy link
Collaborator Author

theolivenbaum commented Mar 25, 2021 via email

@ChrML
Copy link

ChrML commented Mar 25, 2021

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.

@theolivenbaum
Copy link
Collaborator Author

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.

@theolivenbaum
Copy link
Collaborator Author

Closed with initial implementation in PR #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants