Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Initial URL with a trailing slash adds double slash on relative urls #389

Open
rcronin opened this issue May 9, 2023 · 0 comments
Open

Comments

@rcronin
Copy link

rcronin commented May 9, 2023

Describe the bug
When setting url in the initial useFetch with a trailing slash, addition get/post/patch functions where you add more to the URL adds an extra slash, making the request return a 404.

const { get, loading, error } = useFetch('https://google.com/');
await get('test/test1');

URL will resolve to http://google.com//test/test1

To Reproduce
See above

Expected behavior
Would expect the URL to be https://google.com/test/test1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant