Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

API endpoints with file extensions #574

Closed
loklaan opened this issue Dec 5, 2016 · 2 comments · Fixed by #581
Closed

API endpoints with file extensions #574

loklaan opened this issue Dec 5, 2016 · 2 comments · Fixed by #581

Comments

@loklaan
Copy link
Contributor

loklaan commented Dec 5, 2016

Hello! Great project.

To jump right in, it is a hacky experience to create an axios client for a single-endpoint API that also uses a file extension. ie https://coolapi.com/api.php

All url requests make their way through combineURLs.js, to be appended with a / regardless of if there was a relative url attached to the client's request config.

The current hack (it feels like hack...) to get around this is to add a request interceptor to remove the ending slash. I'm currently doing this in a project.

Happy to PR this issue with a fix to combineURLs - but I want to run it past owners first for validity.

Cheers! ✨

@nickuraltsev
Copy link
Member

I'd be happy to accept a PR for this. Thank you!

@loklaan
Copy link
Contributor Author

loklaan commented Dec 7, 2016

Cool! #581

@loklaan loklaan closed this as completed Dec 7, 2016
@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants