Class ApacheResponseAdapter

java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse
ee.jakarta.tck.ws.rs.common.client.ApacheResponseAdapter

public class ApacheResponseAdapter extends HttpResponse
  • Constructor Details

    • ApacheResponseAdapter

      public ApacheResponseAdapter(jakarta.ws.rs.core.Response response, String host, int port)
    • ApacheResponseAdapter

      public ApacheResponseAdapter(jakarta.ws.rs.core.Response response, String host, int port, TextCaser caser)
  • Method Details

    • getStatusCode

      public String getStatusCode()
      Returns the HTTP status code returned by the server
      Overrides:
      getStatusCode in class HttpResponse
      Returns:
      HTTP status code
    • getResponseBodyAsString

      public String getResponseBodyAsString() throws IOException
      Description copied from class: HttpResponse
      Returns the response body as a string using the charset specified in the server's response.
      Overrides:
      getResponseBodyAsString in class HttpResponse
      Returns:
      response body as a String
      Throws:
      IOException
    • getResponseBodyAsRawString

      public String getResponseBodyAsRawString() throws IOException
      Description copied from class: HttpResponse
      Returns the response body of the server without being encoding by the client.
      Overrides:
      getResponseBodyAsRawString in class HttpResponse
      Returns:
      an unecoded String representation of the response
      Throws:
      IOException - if an error occurs reading from the server
    • getReasonPhrase

      public String getReasonPhrase()
      Description copied from class: HttpResponse
      Returns the HTTP reason-phrase returned by the server
      Overrides:
      getReasonPhrase in class HttpResponse
      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 class HttpResponse
      Returns:
      response headers
    • getResponseHeader

      public org.apache.commons.httpclient.Header getResponseHeader(String headerName)
      Description copied from class: HttpResponse
      Returns the response header designated by the name provided.
      Overrides:
      getResponseHeader in class HttpResponse
      Returns:
      a specfic response header or null if the specified header doesn't exist.
    • getResponseEncoding

      public String getResponseEncoding()
      Description copied from class: HttpResponse
      Returns the charset encoding for this response.
      Overrides:
      getResponseEncoding in class HttpResponse
      Returns:
      charset encoding