Package org.scribe.model
Class Response
java.lang.Object
org.scribe.model.Response
Represents an HTTP Response.
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()Obtains the HTTP Response bodyintgetCode()Obtains the HTTP status codeObtains a single HTTP Header value, or null if undefinedObtains aMapcontaining the HTTP Response HeadersObtains the HTTP status message.Obtains the meaningful stream of the HttpUrlConnection, either inputStream or errorInputStream, depending on the status codeboolean
-
Method Details
-
isSuccessful
public boolean isSuccessful() -
getBody
Obtains the HTTP Response body- Returns:
- response body
-
getStream
Obtains the meaningful stream of the HttpUrlConnection, either inputStream or errorInputStream, depending on the status code- Returns:
- input stream / error stream
-
getCode
public int getCode()Obtains the HTTP status code- Returns:
- the status code
-
getMessage
Obtains the HTTP status message. Returnsnullif the message can not be discerned from the response (not valid HTTP)- Returns:
- the status message
-
getHeaders
Obtains aMapcontaining the HTTP Response Headers- Returns:
- headers
-
getHeader
Obtains a single HTTP Header value, or null if undefined- Parameters:
name- the header name.- Returns:
- header value or null.
-