Created
October 14, 2014 16:28
-
-
Save subinkrishna/5709167035250efc9305 to your computer and use it in GitHub Desktop.
A Uri.Builder sample snippet (to build a URL)
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
Uri.Builder builder = new Uri.Builder(); | |
builder.scheme("https") | |
.authority("www.myawesomesite.com") | |
.appendPath("turtles") | |
.appendPath("types") | |
.appendQueryParameter("type", "1") | |
.appendQueryParameter("sort", "relevance") | |
.fragment("section-name"); | |
String myUrl = builder.build().toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment