Skip to content

Commit

Permalink
Added EnsureSuccessStatusCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbrunet committed Jan 29, 2013
1 parent 15c9d6c commit ced528b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MVC4/PersonaMVC4Example/Controllers/PersonaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public async Task<HttpResponseMessage> Login([FromBody] string assertion)
}
);
var result = await client.PostAsync("https://verifier.login.persona.org/verify", content);
result.EnsureSuccessStatusCode();
var stringresult = await result.Content.ReadAsStringAsync();
dynamic jsonresult = JsonConvert.DeserializeObject<dynamic>(stringresult);
if (jsonresult.status == "okay")
Expand Down

0 comments on commit ced528b

Please sign in to comment.