Search code examples
androidandroid-intenturibuilder

uriBuilder.scheme not adding :// in the URL


I am using Uri Builder to generate URL like following.

uriBuilder.scheme("https")
 .appendPath("test")
 .appendQueryParameter("code", "S256")

The output is https:/test?code=S256 .

I need following output https://test?code=S256

If i add uriBuilder.scheme("https://") then it add :// with :/


Solution

  • Try

    uriBuilder.scheme("https")
    .authority("test")
    .appendQueryParameter("code", "S256")