Fix POST ctx.ParseBody(); (Actually fixed it this time)

This commit is contained in:
Michael Nolan
2022-07-27 18:30:52 -05:00
parent 0ff38b0211
commit 8a912e2a86
3 changed files with 53 additions and 8 deletions
+15
View File
@@ -12,6 +12,21 @@ namespace Tesses.WebServer.ConsoleApp
}
Random rand = new Random();
int count = 0;
public override async Task PostAsync(ServerContext ctx)
{
ctx.ParseBody();
foreach(var item in ctx.QueryParams)
{
Console.WriteLine($"{item.Key}:");
foreach(var p in item.Value)
{
Console.WriteLine($"\t{p}");
}
Console.WriteLine();
}
await ctx.SendTextAsync("HELLO");
}
public override async Task GetAsync(ServerContext ctx)
{
//Console.WriteLine("HANDLE");