Код: Выделить всё
WebResponse response = request.GetResponse();
string JSONResult = null;
var data = response.GetResponseStream();
using (var reader = new StreamReader(data))
{
JSONResult = reader.ReadToEnd();
}
Код: Выделить всё
{
"Message": "No HTTP resource was found that matches the request URI '/Foo'.",
"MessageDetail": "No type was found that matches the controller named 'Foo'."
}
Как получить эту конкретную информацию при возникновении ошибки при вызове внешнего API?
Подробнее здесь: https://stackoverflow.com/questions/466 ... stman-body
Мобильная версия