Created
July 4, 2017 14:59
-
-
Save novachevskyi/12b59e53d6162fb1cd4e6236b03fb504 to your computer and use it in GitHub Desktop.
This file contains 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
package com.novachevskyi.okhttptest; | |
import org.junit.Test; | |
import okhttp3.HttpUrl; | |
import static org.junit.Assert.assertEquals; | |
public class OkHttpBug { | |
@Test | |
public void test() throws Exception { | |
HttpUrl.Builder builder = HttpUrl.parse("https://www.google.com/mobile/#!/id").newBuilder(); | |
builder.addQueryParameter("platform", "android"); | |
String url = builder.build().toString(); | |
assertEquals("https://www.google.com/mobile/#!/id?platform=android", url); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment