Package com.restfb
Class WebRequestor.Response
java.lang.Object
com.restfb.WebRequestor.Response
- Enclosing interface:
- WebRequestor
Encapsulates an HTTP response body and status code.
- Author:
- Mark Allen
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a response with the given HTTP status code and response body as text.Response(Integer statusCode, String body, DebugHeaderInfo debugHeaderInfo) Creates a response with the given HTTP status code, response body and debug header info.Response(Integer statusCode, String body, DebugHeaderInfo debugHeaderInfo, Map<String, List<String>> headers) Creates a response with status, body, debug info and headers. -
Method Summary
-
Constructor Details
-
Response
Creates a response with the given HTTP status code and response body as text.- Parameters:
statusCode- The HTTP status code of the response.body- The response body as text.
-
Response
Creates a response with the given HTTP status code, response body and debug header info.- Parameters:
statusCode- The HTTP status code of the response.body- The response body as text.debugHeaderInfo- debug info parsed from the headers (may benull)
-
Response
public Response(Integer statusCode, String body, DebugHeaderInfo debugHeaderInfo, Map<String, List<String>> headers) Creates a response with status, body, debug info and headers.
-
-
Method Details
-
getStatusCode
Gets the HTTP status code.- Returns:
- The HTTP status code.
-
getBody
Gets the HTTP response body as text.- Returns:
- The HTTP response body as text.
-
getDebugHeaderInfo
Gets the debug header information parsed from the response headers.- Returns:
- debug header information, may be
null
-
getHeaders
Gets the HTTP headers returned by Facebook.- Returns:
- unmodifiable header map or
null
-
toString
-