Package org.webbitserver.netty

Examples of org.webbitserver.netty.NettyHttpRequest.queryParam()


    @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");
    }

    @Test
    public void decodesQueryParamsContainingEncodedEquals() {
        HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.GET, "http://example.com/?foo=a%2Bb%3Dc");
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
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.