Menu

HttpClient integrations frustrated me, so I'm looking for feedback for my RPC framework library based on interfaces

Reddit r/csharp·u/Brick-Logic·6 months ago
#SOOsMH6U
#client#contract#support#integrations#looking
Reading 0:00
15s threshold

Greetings people!

As the title says, I got enough of manual integrations and I wanted to use interfaces to connect to the server endpoints. Because the project grew a lot, I'm now looking for feedback in order to validate and improve it for production/industrial usage.

Yes, I tried looking for libraries that combined good developer experience, speed and free of memory leaks, but I couldn't find anything that could suffice. I wanted to call endpoints from interfaces that shared the same firm.

The idea developed a lot, and now it became a declarative framework with optional manual settings:

First, we need a Contract:

[HttpTransport] public interface IUserContract : IControllerContract { [RateLimit(5)] [HttpGet] Task TestHubcon(string message); }

A Controller:

[Authorize(Roles:"Staff")] [UseJwt] public class UserController : IUserContract { [Authorize(Roles:"Manager")] public async Task GetUser(string id) => return "Server response"; }

Then calling it from the client using the optional Execute…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.