2024-11-22 07:40:43 +01:00
|
|
|
|
namespace Uwaa.HTTP.Routing;
|
|
|
|
|
|
|
|
|
|
public class StaticEndpoint : RouterBase
|
|
|
|
|
{
|
|
|
|
|
public HttpResponse Response;
|
|
|
|
|
|
|
|
|
|
public StaticEndpoint(HttpResponse response)
|
|
|
|
|
{
|
|
|
|
|
Response = response;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-19 02:26:42 +01:00
|
|
|
|
public override HttpMethod Method => HttpMethod.Any;
|
2024-11-22 07:40:43 +01:00
|
|
|
|
|
|
|
|
|
public override int Arguments => 0;
|
|
|
|
|
|
|
|
|
|
protected override Task<HttpResponse?> GetResponseInner(HttpRequest req, HttpClientInfo info, ArraySegment<string> path)
|
|
|
|
|
{
|
|
|
|
|
return Task.FromResult(Response)!;
|
|
|
|
|
}
|
|
|
|
|
}
|