java - uriBuilder returns http:/ instead of http:// -


i use code:

uribuilder builder = uribuilder         .frompath(constants.livemap_base_url_us)         .scheme("http"); return builder.build().tostring(); 

how can it has generated "http:/" instead of "http://" ?

returned value = http:/livemap-tiles1.waze.com/tiles/internal?linegeom=...

you're misusing frompath. method expects uri path, providing host , path.

if have full uri, use uribuilder#fromuri, otherwise build part part

uribuilder builder = uribuilder.frompath("tiles")                                .host("livemap-tiles1.waze.com")                                .scheme("http")                                .path("internal"); // etc. 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -