'/foo//' copyWithoutAll: '/'
Le 8 mars 2019 à 12:40, Cédrick Béler <cdrick65@gmail.com> a écrit :
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, Tim Mackinnon <tim@testit.works> a écrit :
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 - magically handle
/name//resourse /name///resource
Iâm sure we have something simple - the best I could see was to abuse Path like:
(Path from: basePath, '/', resourcePath) pathString
Is this a good way to do it?
Tim