Android URL - Incomplete path

Asked

Viewed 19 times

0

Hello!

I’m trying to create a URL but it seems that when I create the URL she is not created with the full path.

Creation of the URL

url = new URL("https://api.plivo.com/v1/Account/" + authID + "/Message/");

When I take the path from the URL

System.out.println(url.getPath());

The result is: I/System.out: /v1/Account/XXXXXXXXXXXXXXXX/Message/

Someone knows how to fix this?

1 answer

0


Fala Guidupas,

Why are you taking the getPath()?

You can notice that if you print only the url already solves:

System.out.println(url);

Hugs.

  • Thank you Leonardo.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.