Which objects can you check to achieve this goal?

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.)

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



Leave a Reply 3

Your email address will not be published. Required fields are marked *


bidy

bidy

There is no IsUnauthorized property

Parker

Parker

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.

Alan

Alan

A & C

HttpResponseMessage.StatusCode == HttpStatusCode.Unauthorized
HttpResponseMessage.ReasonPhrase == “Unauthorized”

D is false:

IsSuccessStatusCode is true if StatusCode is in the Successful range (200-299).