Class ApacheResponseAdapter
java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse
ee.jakarta.tck.ws.rs.common.client.ApacheResponseAdapter
-
Constructor Summary
ConstructorsConstructorDescriptionApacheResponseAdapter
(jakarta.ws.rs.core.Response response, String host, int port) ApacheResponseAdapter
(jakarta.ws.rs.core.Response response, String host, int port, TextCaser caser) -
Method Summary
Modifier and TypeMethodDescriptionReturns the HTTP reason-phrase returned by the serverReturns the response body of the server without being encoding by the client.Returns the response body as a string using the charset specified in the server's response.Returns the charset encoding for this response.org.apache.commons.httpclient.Header
getResponseHeader
(String headerName) Returns the response header designated by the name provided.org.apache.commons.httpclient.Header[]
Returns the headers received in the response from the server.Returns the HTTP status code returned by the serverMethods inherited from class ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse
getHost, getPath, getPort, getProtocol, getResponseBodyAsBytes, getResponseBodyAsRawBytes, getResponseBodyAsRawStream, getResponseBodyAsStream, getResponseHeaders, getState, toString
-
Constructor Details
-
ApacheResponseAdapter
-
ApacheResponseAdapter
-
-
Method Details
-
getStatusCode
Returns the HTTP status code returned by the server- Overrides:
getStatusCode
in classHttpResponse
- Returns:
- HTTP status code
-
getResponseBodyAsString
Description copied from class:HttpResponse
Returns the response body as a string using the charset specified in the server's response.- Overrides:
getResponseBodyAsString
in classHttpResponse
- Returns:
- response body as a String
- Throws:
IOException
-
getResponseBodyAsRawString
Description copied from class:HttpResponse
Returns the response body of the server without being encoding by the client.- Overrides:
getResponseBodyAsRawString
in classHttpResponse
- Returns:
- an unecoded String representation of the response
- Throws:
IOException
- if an error occurs reading from the server
-
getReasonPhrase
Description copied from class:HttpResponse
Returns the HTTP reason-phrase returned by the server- Overrides:
getReasonPhrase
in classHttpResponse
- Returns:
- HTTP reason-phrase
-
getResponseHeaders
public org.apache.commons.httpclient.Header[] getResponseHeaders()Description copied from class:HttpResponse
Returns the headers received in the response from the server.- Overrides:
getResponseHeaders
in classHttpResponse
- Returns:
- response headers
-
getResponseHeader
Description copied from class:HttpResponse
Returns the response header designated by the name provided.- Overrides:
getResponseHeader
in classHttpResponse
- Returns:
- a specfic response header or null if the specified header doesn't exist.
-
getResponseEncoding
Description copied from class:HttpResponse
Returns the charset encoding for this response.- Overrides:
getResponseEncoding
in classHttpResponse
- Returns:
- charset encoding
-