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:
getStatusin classHttpResponse- Returns:
- the status code of the http response
-
getStatusText
the HTTP status text- Specified by:
getStatusTextin classHttpResponse- Returns:
- the status text of the http response
-
getHeader
- Specified by:
getHeaderin classHttpResponse
-
getHeaders
- Specified by:
getHeadersin classHttpResponse
-
getString
Description copied from class:HttpResponseget the response body as a string- Specified by:
getStringin classHttpResponse- Returns:
- the body of the http response
-
getString
Description copied from class:HttpResponseget the response body as a string- Specified by:
getStringin classHttpResponse- Parameters:
encoding- string charset encoding- Returns:
- the body of the http response
-
getStream
Get the response as a stream- Specified by:
getStreamin classHttpResponse- Returns:
- an InputStream
-