Examples of CaseInsensitiveMultiMap


Examples of org.vertx.java.core.http.CaseInsensitiveMultiMap

            }
        }));

        Buffer body = new Buffer(json.encode());

        MultiMap headers = new CaseInsensitiveMultiMap();
        headers.add("content-type", "application/json");
        headers.add("content-length", Integer.toString(body.length()));

        new YokeTester(yoke).request("POST", "/search/2012-07-14T00:00:00Z/2013-07-14T00:00:00Z", headers, body, new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(200, resp.getStatusCode());
View Full Code Here

Examples of org.vertx.java.core.http.CaseInsensitiveMultiMap

            }
        });

        Buffer body = new Buffer(json.encode());

        MultiMap headers = new CaseInsensitiveMultiMap();
        headers.add("content-type", "application/json");
        headers.add("content-length", Integer.toString(body.length()));

        new YokeTester(yoke).request("POST", "/", headers, body, new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(200, resp.getStatusCode());
View Full Code Here

Examples of org.vertx.java.core.http.CaseInsensitiveMultiMap

            }
        });

        Buffer body = new Buffer(json.encode());

        MultiMap headers = new CaseInsensitiveMultiMap();
        headers.add("content-type", "application/json");
        headers.add("content-length", Integer.toString(body.length()));

        new YokeTester(yoke).request("POST", "/", headers, body, new Handler<Response>() {
            @Override
            public void handle(Response resp) {
                assertEquals(200, resp.getStatusCode());
View Full Code Here

Examples of org.vertx.java.core.http.CaseInsensitiveMultiMap

    @Test
    public void testLimit() {
        Yoke yoke = new Yoke(this);
        yoke.use(new com.jetdrone.vertx.yoke.middleware.Limit(1000));

        MultiMap headers = new CaseInsensitiveMultiMap();
        headers.add("content-type", "text/plain");
        headers.add("content-length", "1024");

        Buffer body = new Buffer(1024);

        for (int i=0; i < 1024; i++) {
            body.appendByte((byte) 'A');
View Full Code Here

Examples of org.vertx.java.core.http.CaseInsensitiveMultiMap

                        assertEquals(200, resp.getStatusCode());
                        final String cookie = resp.headers.get("set-cookie");
                        assertNotNull(cookie);

                        // make a new request to / with cookie should return again the same cookie
                        MultiMap headers = new CaseInsensitiveMultiMap();
                        headers.add("cookie", cookie);

                        yokeAssert.request("GET", "/", headers, new Handler<Response>() {
                            @Override
                            public void handle(Response resp) {
                                // the session should be the same, so no set-cookie
                                assertEquals(200, resp.getStatusCode());
                                String nocookie = resp.headers.get("set-cookie");
                                assertNull(nocookie);

                                // end the session
                                MultiMap headers = new CaseInsensitiveMultiMap();
                                headers.add("cookie", cookie);

                                yokeAssert.request("GET", "/delete", headers, new Handler<Response>() {
                                    @Override
                                    public void handle(Response resp) {
                                        // there should be a set-cookie with maxAge 0
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.