Fix POST ctx.ParseBody(); (Actually fixed it this time)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user