:dizzy: NClient is an automatic type-safe .Net HTTP client that allows you to call web service API methods using annotated interfaces or controllers without boilerplate code.
When I want to write in a functional style, I want to skip creating interfaces and use functions. However, it is now impossible to create a client without an interface.
I propose this implementation:
[GetMethod("api/entities/{id}")]
delegate Task<Entity> GetEntityAsync([RouteParam] int id);
...
var getEntityAsync = NClientGallery.Clients.GetRest()
.For<GetEntityAsync>("https://localhost:5000")
.Build();
When I want to write in a functional style, I want to skip creating interfaces and use functions. However, it is now impossible to create a client without an interface.
I propose this implementation: