mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-21 23:01:26 +00:00
Refactor code for reading the body of a request
This commit is contained in:
parent
2372dfbb9e
commit
4150e44f80
6 changed files with 45 additions and 69 deletions
|
@ -30,9 +30,7 @@ public class LoginController : ControllerBase
|
|||
[HttpPost]
|
||||
public async Task<IActionResult> Login()
|
||||
{
|
||||
MemoryStream ms = new();
|
||||
await this.Request.Body.CopyToAsync(ms);
|
||||
byte[] loginData = ms.ToArray();
|
||||
byte[] loginData = await this.Request.BodyReader.ReadAllAsync();
|
||||
|
||||
NPTicket? npTicket;
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue