You are developing a Windows Store app.
You need to find out whether an HTTP request has completed with an Unauthorized result.
Which objects can you check to achieve this goal? (Each correct answer presents a complete solution. Choose
all that apply.)
A.
HttpResponseMessage.StatusCode
B.
HttpResponseMessage.IsUnauthorized
C.
HttpResponseMessage.ReasonPhrase
D.
HttpResponseMessage.IsSuccessStatusCode
There is no IsUnauthorized property
the current answer is A D.
Some post said that should use HttpResponseMessage.ReasonPhrase.
this property is used to return additional custom message.
you can’t judge the state form custom string.
A & C
HttpResponseMessage.StatusCode == HttpStatusCode.Unauthorized
HttpResponseMessage.ReasonPhrase == “Unauthorized”
D is false:
IsSuccessStatusCode is true if StatusCode is in the Successful range (200-299).