HTTP Status Codes

Status code: Description
200: OK, request received, everything normal
301: moved permanently
404: Page not found
500: Internal server error

List of HTTP status codes
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
3xx Redirection
4xx Client Error
5xx Server Error

the request is successful
200
the request is unsuccessful
400

EX

Error 400: Bad Request

Bad endtime value "2014-01-02asdfasdf". Valid values are ISO-8601 timestamps.

Usage details are available from https://earthquake.usgs.gov/fdsnws/event/1

200 response code -> Proceed with reading input stream and parsing the JSON response
Any other response code -> Return empty string for the JSON response