Package org.apache.wink.client.internal.handlers

Examples of org.apache.wink.client.internal.handlers.GzipHandler


        /*
         * test even with the GZIP Handler on the path
         */
        ClientConfig clientConfig = new ClientConfig();
        clientConfig.handlers(new GzipHandler());
        client = new RestClient(clientConfig);

        response = client.resource(getBaseURI() + "/regular/repeatedstring").get();
        verifyResponseNotContentEncodedForRepeatedStrings(response);
    }
View Full Code Here


     * This is GZIP content encoded. This uses the client handler
     * {@link GzipHandler}.
     */
    public void testGZIPContentEncodedGetRepeatedStringsResource() throws IOException {
        ClientConfig clientConfig = new ClientConfig();
        clientConfig.handlers(new GzipHandler());
        RestClient client = new RestClient(clientConfig);

        ClientResponse response =
            client.resource(getBaseURI() + "/contentencode/repeatedstring").get();
        assertEquals(200, response.getStatusCode());
View Full Code Here

    /**
     * Tests that the server side request headers have the Content-Encoding
     * stripped since the filter is decoding it.
     */
    public void testHttpHeaderRequest() throws IOException {
        RestClient client = new RestClient(new ClientConfig().handlers(new GzipHandler()));
        ClientResponse response =
            client.resource(getBaseURI() + "/contentencode/httpheadercontentencoding")
                .header(HttpHeaders.ACCEPT_ENCODING, "*").accept(MediaType.TEXT_PLAIN)
                .contentType(MediaType.TEXT_PLAIN).post("HI");
        assertEquals(200, response.getStatusCode());
View Full Code Here

TOP

Related Classes of org.apache.wink.client.internal.handlers.GzipHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.