Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Dev #107 #151

Merged
merged 1 commit into from
Jul 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
if (request.RequestUri.ToString().Contains("api/calculation"))
{
var requestResponse = await base.SendAsync(request, cancellationToken);
if (!requestResponse.IsSuccessStatusCode)
{
return requestResponse;
}
var contentString = await requestResponse.Content.ReadAsStringAsync();
//Retrieve the CalculationId from the post request
var responseContent = JObject.Parse(contentString);
Expand All @@ -43,7 +47,10 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
while (true)
{
calculationStateResponse = await base.SendAsync(calculationStateRequest, cancellationToken);

if (!calculationStateResponse.IsSuccessStatusCode)
{
return calculationStateResponse;
}
var calculationResponseContent = JObject.Parse(await calculationStateResponse.Content.ReadAsStringAsync());
var calculationResultStatus = calculationResponseContent["Result"].ToString();

Expand Down