For small files, just return an Ok result without anything
This commit is contained in:
parent
39a418b729
commit
785f503426
|
|
@ -55,10 +55,10 @@ app.MapGet("/api/v1/config", (HttpRequest request) =>
|
||||||
return Results.Json(config, AppJsonSerializerContext.Default);
|
return Results.Json(config, AppJsonSerializerContext.Default);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapGet("/api/v1/small", (HttpResponse response) =>
|
app.MapGet("/api/v1/small", (HttpResponse response, ILogger<Program> logger) =>
|
||||||
{
|
{
|
||||||
response.ContentType = "application/octet-stream";
|
response.ContentType = "application/octet-stream";
|
||||||
return Results.File(new byte[] { 0 });
|
return Results.Ok();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapGet("/api/v1/large", async (HttpRequest request, HttpResponse response, ILogger<Program> logger) =>
|
app.MapGet("/api/v1/large", async (HttpRequest request, HttpResponse response, ILogger<Program> logger) =>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue