mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Additional fixes for 3.0
This commit is contained in:
@@ -47,7 +47,11 @@ namespace BTCPayServer.Models
|
||||
}
|
||||
context.HttpContext.Response.Headers.Add("Content-Type", new Microsoft.Extensions.Primitives.StringValues("application/json"));
|
||||
var str = JsonConvert.SerializeObject(jobj);
|
||||
#if NETCOREAPP21
|
||||
using (var writer = new StreamWriter(context.HttpContext.Response.Body, new UTF8Encoding(false), 1024 * 10, true))
|
||||
#else
|
||||
await using (var writer = new StreamWriter(context.HttpContext.Response.Body, new UTF8Encoding(false), 1024 * 10, true))
|
||||
#endif
|
||||
{
|
||||
await writer.WriteAsync(str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user