Package play.libs.ws
Class HttpAsyncResponse
java.lang.Object
play.libs.ws.HttpResponse
play.libs.ws.HttpAsyncResponse
An HTTP response wrapper
-
Constructor Summary
ConstructorsConstructorDescriptionHttpAsyncResponse
(com.ning.http.client.Response response) You shouldn't have to create an HttpResponse yourself -
Method Summary
Modifier and TypeMethodDescriptionThe HTTP status codethe HTTP status textget the response as a streamget the response body as a stringget the response body as a stringMethods inherited from class play.libs.ws.HttpResponse
getContentType, getEncoding, getJson, getQueryString, getXml, getXml, success
-
Constructor Details
-
HttpAsyncResponse
public HttpAsyncResponse(com.ning.http.client.Response response) You shouldn't have to create an HttpResponse yourself- Parameters:
response
- The given response
-
-
Method Details
-
getStatus
The HTTP status code- Specified by:
getStatus
in classHttpResponse
- Returns:
- the status code of the http response
-
getStatusText
the HTTP status text- Specified by:
getStatusText
in classHttpResponse
- Returns:
- the status text of the http response
-
getHeader
- Specified by:
getHeader
in classHttpResponse
-
getHeaders
- Specified by:
getHeaders
in classHttpResponse
-
getString
Description copied from class:HttpResponse
get the response body as a string- Specified by:
getString
in classHttpResponse
- Returns:
- the body of the http response
-
getString
Description copied from class:HttpResponse
get the response body as a string- Specified by:
getString
in classHttpResponse
- Parameters:
encoding
- string charset encoding- Returns:
- the body of the http response
-
getStream
get the response as a stream- Specified by:
getStream
in classHttpResponse
- Returns:
- an inputstream
-