I want to know what the Web Api is receiving in the Post that I'm sending.
This is the code I'm using.
var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://d6dc30b8-0ee0-4-231-b9ee.azurewebsites.net/");
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = "application/json";
httpWebRequest.Accept = "application/vnd.lyoness.servicesv1 + json";
httpWebRequest.Headers.Add("Date" + tempo);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
MessageBox.Show(json);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var teste = streamReader.ReadToEnd();
MessageBox.Show(teste);
}