use HttpURLConnection constants for response code