Flux.REST: Query parameters
Closed this issue · 1 comments
YuriyDurov commented
Allow users to configure query parameters when making REST requests.
YuriyDurov commented
Currently query parameters can be implemented something like this:
services.AddFlux(x =>
{
x.AddService("my-api")
.UsingRest("my-api-url")
.AddSet<MyDto>()
.WithEndpoint("entities{query}");
});
var flux = services.GetRequiredService<IFluxContext>();
var set = flux.Set<MyDto>();
var query = "?param1=value1¶m2=value2";
var list = await set.GetAllAsync(query);
This is not a perfect solution, but it should do the trick for now.
Closing this for now, will consider reopening in the future once more functionality is built around this in order to support more advanced approaches.