What does the getResponseMessage () method of HttpURLConnection return?

I am writing an Android application that uses HttpURLConnection to download. I am wondering how the getResponseMessage () method returns . If I make a successful request (200 OK), will it return the same as the data, the data getInputStream () ? What will he return if my request receives a non-200 status code?

+4
source share
1 answer

It will return an HTTP response message. Take a look here http://en.m.wikipedia.org/wiki/List_of_HTTP_status_codes
Like Famous 404 Not Found.

:
Returns the response message returned by the remote HTTP

, . .

+4

All Articles