You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, awesome lib,
Why is it not possible to append multiple segments tho ? Maybe there's a logic behind that or I missed something.
constAPI_BASE_URL=newURI('https://api-staging.foo.fr/v1/foo')constcustomUrl=API_BASE_URL().clone().segment(['name','customer','whatever'])// <- it replaces existing `v1/foo` path :(.toString()// => https://api-staging.foo.fr/name/customer/whatever// actual not so elegant solutionconstcustomUrl=API_BASE_URL().clone().segment('name').segment('customer').segment('whatever')// <- I dont find it really relevant.toString()// => https://api-staging.foo.fr/v1/foo/name/customer/whatever// proposalconstcustomUrl=API_BASE_URL().clone().appendSegment(['name','customer','whatever']).toString()// => https://api-staging.foo.fr/v1/foo/name/customer/whatever
The text was updated successfully, but these errors were encountered:
Hey, awesome lib,
Why is it not possible to append multiple segments tho ? Maybe there's a logic behind that or I missed something.
The text was updated successfully, but these errors were encountered: