Uri Builder in android - '/' replaced by '/' and “:” is replaced by “:”

后端 未结 3 1125
夕颜
夕颜 2021-02-04 00:45

I want to build the following URI -

https://10.112.88.182:8443/Vehicle/services/socialService/login

...

Builder builder = new          


        
3条回答
  •  长发绾君心
    2021-02-04 01:16

    Like laalto said, this is how Uri.Builder works but if you want to get the uri in a regular url form, like in your case: https://10.112.88.182:8443/Vehicle/services/socialService/login you can do:

    URL url = new URL(URLDecoder.decode(builder.build().toString(), "UTF-8"));
    

提交回复
热议问题