Query String is a way of passing some extra data to the server with the request, uisng the URL.
?id=101&name=iPhone
if ( context.Request.Query.ContainsKey(“id”) &&
context.Request.Query.ContainsKey(“name”) )
{
string id = context.Request.Query[“id”];
string name = context.Request.Query[“name”];
….
}
app.Run(async (HttpContext context) =>
{
string path = context.Request.Path;
string method = context.Request.Method;
….
}
Posted by