1
I’m trying to read the data of an order, where I send the information via get, Error: Unable to send content with this verb type.
public string ConsultaPedido(string urlpedido, string NumeroPedido)
{
var request = (HttpWebRequest)WebRequest.Create(urlpedido + "/" + NumeroPedido +"/");
request.ContentType = "application/json";
request.Method = "GET";
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
AuthToken = "8686330657058660259"
});
streamWriter.Write(json);
}
var response = (HttpWebResponse)request.GetResponse();
using (var streamReader = new StreamReader(response.GetResponseStream()))
{
return streamReader.ReadToEnd();
}
}
What the API you want to query asks as JSON for the query?
– Leonardo Bonetti
Leonardo, I added in the image, ask for the order number and token
– Harry
I added an image to the question
– Harry