report.OK
This commit is contained in:
parent
54a900c361
commit
9575dd2754
5 changed files with 20 additions and 7 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue