public staticStringShowRequestData (HttpListenerRequest request)
{
if (!request.HasEntityBody)
{
Console.WriteLine("No client data was sent with the request.");
return"";
}
System.IO.Stream body = request.InputStream;
System.Text.Encoding encoding = Encoding.UTF8;
System.IO.StreamReader reader = newSystem.IO.StreamReader(body, encoding);
// Convert the data to a string and display it on the console.
string jsonData = reader.ReadToEnd();
Console.WriteLine("jsonData : " +jsonData);
Console.WriteLine("End of client data:");
body.Close();
reader.Close();
return jsonData;
}
public string CheckDetails(string param1)
{
var chk = new check
{
result = param1
};
returnJsonConvert.SerializeObject(chk);
}
public classcheck
{
public string result { get; set; }
}