HttpResponseMessage.EnsureSuccessStatusCode Method

Throws an exception if the IsSuccessStatusCode property for the HTTP response is false.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

'Declaration
Public Function EnsureSuccessStatusCode As HttpResponseMessage
'Usage
Dim instance As HttpResponseMessage 
Dim returnValue As HttpResponseMessage 

returnValue = instance.EnsureSuccessStatusCode()

Return Value

Type: System.Net.Http.HttpResponseMessage
Returns HttpResponseMessage.The HTTP response message if the call is successful.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft