I don't know whether you want to build just "paths" or valid URIs, if it's
the latter, I'd suggest ZnUrl as well.
'/name/' asPath / 'resource'. -> /name/resource
'/name/' asPath / '/resource'. -> /resource (which is correct)
'/name/' asUrl / '/resource' -> /name//resource (which is correct as
'/foo//' copyWithoutAll: '/'
> Le 8 mars 2019 à 12:40, Cédrick Béler a écrit :
>
> Not sure but I would use ZnUrl
>
> ZnUrl new
> scheme: #http;
> host: NetNameResolver loopBackName;
> addPathSegments: #('echo' 'foo');
> yourself
>
>
Not sure but I would use ZnUrl
ZnUrl new
scheme: #http;
host: NetNameResolver loopBackName;
addPathSegments: #('echo' 'foo');
yourself
Making sure Path segments do not contain separator…
Hth,
Cédrick
> Le 8 mars 2019 à 12:33,
I’m sure we have something in the image that deals with this - but if writing a
generic http retriever and wanting to correctly cope with constructing resource
paths where the base path may or may not have a trailing /, and the resource
path may or may not have a leading /
Basically -