Search in sources :

Example 6 with HttpResponse

use of ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method getReturnedNumber.

// ///////////////////////////////////////////////////////////////////////
protected int getReturnedNumber() throws Fault {
    HttpResponse response = _testCase.getResponse();
    String body;
    try {
        body = response.getResponseBodyAsString();
    } catch (IOException e) {
        throw new Fault(e);
    }
    return Integer.parseInt(body);
}
Also used : HttpResponse(ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse) IOException(java.io.IOException)

Aggregations

HttpResponse (ee.jakarta.tck.ws.rs.common.webclient.http.HttpResponse)6 IOException (java.io.IOException)2 Test (org.junit.jupiter.api.Test)2 Header (org.apache.commons.httpclient.Header)1 HttpClient (org.apache.commons.httpclient.HttpClient)1 HttpConnection (org.apache.commons.httpclient.HttpConnection)1 DefaultProtocolSocketFactory (org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory)1 Protocol (org.apache.commons.httpclient.protocol.Protocol)1 ProtocolSocketFactory (org.apache.commons.httpclient.protocol.ProtocolSocketFactory)1 SSLProtocolSocketFactory (org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory)1