Closed
Description
I have code that looks like
const uri = new URI('')
.protocol('food')
.path('test/file.csv')
.toString()
I expected uri
to be food:///test/file.csv
, but it's food://test/file.csv
.
When re-parsing uri
the host
is now test
and path
has changed from test/file.csv
to /file.csv
.
Is this expected, and if so, should I ensure my path
has a leading slash? Or, is this unexpected behaviour in the library?
Thanks for this library, and for your time!