Added Json flag to RouteRequest and RouteResponse to control whether or not the content is Json and needs to be handled. Updated example code. Renamed ClientCodeGenerator to RestClientGenerator. Bumped package version to 1.2.2.
This commit is contained in:
@ -81,7 +81,7 @@ namespace MontoyaTech.Rest.Net.Example
|
||||
var response = this.Client.HttpClient.Send(message);
|
||||
|
||||
if (response.StatusCode == System.Net.HttpStatusCode.OK)
|
||||
return JsonConvert.DeserializeObject<bool>(response.Content.ReadAsStringAsync().GetAwaiter().GetResult());
|
||||
return bool.Parse(response.Content.ReadAsStringAsync().GetAwaiter().GetResult());
|
||||
else
|
||||
throw new Exception("Unexpected Http Response StatusCode:" + response.StatusCode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user