0

Not a problem just something i can't find anywhere in my app I build a URL using Uri.Builder All I want to know if there is a way to see the end result of the Uri.Builder because there I do call information from several EditText boxes as well as spinners and I am unsure if it is actually giving the right URL

Here is the URL builder, as you can see i am pulling info from 2 edittext boxes as well as a spinner populated by json

Uri.Builder builder=new Uri.Builder();
        builder.scheme("https")
                .authority("www.smartpractice.co.za")
                .appendPath("files-upload-ruben.asp")
                .appendQueryParameter("MyForm", "Yes")
                .appendQueryParameter("ClientID", String.valueOf(R.id.clientid))
                .appendQueryParameter("Username", String.valueOf(R.id.emailtext))
                .appendQueryParameter("Pwd", String.valueOf(R.id.pwdtext))
        .appendQueryParameter("category", String.valueOf(R.id.spinner));
        myURL=builder.build().toString();
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ruben Meiring
  • 333
  • 2
  • 21

1 Answers1

1

Call toString() on the builder object:

 builder.toString();

Looks like you're already assigning the output to variable myURL, builder.toString(); calls through to builder.build().toString(); anyway, so either method will produce the same url.

JakeB
  • 2,043
  • 3
  • 12
  • 19