report.OK

This commit is contained in:
Paul Schneider 2021-05-16 05:33:05 +01:00
commit 9575dd2754
5 changed files with 20 additions and 7 deletions

View file

@ -83,7 +83,10 @@ namespace nuget_cli
{
String json = re.ReadToEnd();
report.Message = json;
report.StatusCode = (resp as HttpWebResponse).StatusCode.ToString();
var hrep = resp as HttpWebResponse;
report.StatusCode = hrep.StatusCode.ToString();
report.OK = hrep.StatusCode ==
HttpStatusCode.Accepted || hrep.StatusCode == HttpStatusCode.OK;
}
else throw new Exception("Invalid server response type");
}