Package org.webbitserver.netty

Examples of org.webbitserver.netty.NettyHttpRequest


public class NettyHttpRequestTest {

    @Test
    public void decodesQueryParams() {
        HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.GET, "http://example.com/?foo=bar");
        NettyHttpRequest nhr = new NettyHttpRequest(null, httpRequest, null, 0L);
        assertEquals(nhr.queryParam("foo"), "bar");
    }
View Full Code Here


    }

    @Test
    public void decodesQueryParamsContainingEncodedEquals() {
        HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.GET, "http://example.com/?foo=a%2Bb%3Dc");
        NettyHttpRequest nhr = new NettyHttpRequest(null, httpRequest, null, 0L);
        assertEquals(nhr.queryParam("foo"), "a+b=c");
    }
View Full Code Here

TOP

Related Classes of org.webbitserver.netty.NettyHttpRequest

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.