Skip to content

Instantly share code, notes, and snippets.

@subinkrishna
Created October 14, 2014 16:28
Show Gist options
  • Save subinkrishna/5709167035250efc9305 to your computer and use it in GitHub Desktop.
Save subinkrishna/5709167035250efc9305 to your computer and use it in GitHub Desktop.
A Uri.Builder sample snippet (to build a URL)
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