Closed ErenKrt closed 2 years ago
Can you give some sample code that isn't working?
Hello again, when i tried access to "HttpProxyAsync" cant find any method because this extension of BaseController. Minimal API not using controller then i added app.UseProxies
its working but swagger cant find endpoint of proxies and i needed that. My endpoint like that;
app.MapGet("test", async (HttpContent ctx) =>
{
// I Cant figure what i need write
// return ctx.HttpProxyAsync("http://example.com");
// My expectation like this. I couldn't find anything about usage with minimal api on your wiki.
});
I see. We just need to expose an extension method for that. Adding now.
"Minimal API" is a totally new approach from Microsoft, starting in .net6.0. You should really implement this, as it is a very very fast api framework. (which is not done by just implementing an interface method, to my knowledge)
@delasource, the performance improvements in .NET 6 apply across the board, regardless of whether or not you use minimal API.
Minimal API does two primary things, as far as I can tell:
In this case, this fix addressed (1). This library can be used in a minimal API context now.
It does not address (2), but I would love to see the data on what, exactly, the dependency footprint delta is.
From a performance standpoint, it should be the same as long as I add net6.0
as a target, which I can do fairly quickly. I will add this to the next release.
Hello, im trying use on my minimal api on net 6.0. I cant figure out, i tried some things but not work. Anybody know working way ?