Created
December 28, 2013 23:59
-
-
Save neotyk/8165807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java | |
index 586b74a..a2ced7a 100644 | |
--- api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java | |
+++ api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java | |
@@ -74,6 +74,16 @@ public class RequestBuilderTest { | |
} | |
@Test(groups = {"standalone", "default_provider"}) | |
+ public void testAddQueryParameterReadRawUrl() throws UnsupportedEncodingException { | |
+ RequestBuilder rb = new RequestBuilder("GET", true).setUrl("http://example.com/path") | |
+ .addQueryParameter("a", "1?&") | |
+ .addQueryParameter("b", "+ ="); | |
+ Request request = rb.build(); | |
+ assertEquals(request.getUrl(), "http://example.com/path?a=1%3F%26&b=%2B%20%3D"); | |
+ assertEquals(request.getRawUrl(), "http://example.com/path?a=1?&&b=+ ="); | |
+ } | |
+ | |
+ @Test(groups = {"standalone", "default_provider"}) | |
public void testChaining() throws IOException, ExecutionException, InterruptedException { | |
Request request = new RequestBuilder("GET") | |
.setUrl("http://foo.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment