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

Dealing with path prefixes #112

Open
teleclimber opened this issue Jan 1, 2021 · 3 comments · May be fixed by #115
Open

Dealing with path prefixes #112

teleclimber opened this issue Jan 1, 2021 · 3 comments · May be fixed by #115

Comments

@teleclimber
Copy link
Contributor

Hi again,

How does one deal with path prefixes. For example say y API is at

https://somesite.com/api/v0/

When I try to load:

https://somesite.com/api/v0/widgets/2/

It tells me that "api" is not a known resource.

I could fake it by altering the URL of the incoming request, but then all the urls embedded in the JSON would be wrong?

AFAIK it's pretty common to for APIs to have path prefixes like /api/. IS there a way to deal with this that I missed? Thanks.

@mfcochauxlaberge
Copy link
Owner

This is a feature that does not exist because I simply didn't need it and didn't think about it. But it's definitely needed. I'll see what can be done. Right now, I'm thinking about some sort of URLOptions struct that can be passed to functions used to create a SimpleURL or a URL.

@teleclimber
Copy link
Contributor Author

Great thanks.

Right now, I'm thinking about some sort of URLOptions struct that can be passed to functions used to create a SimpleURL or a URL.

I agree, this is where I was thinking the path prefix would be specified.

@mfcochauxlaberge
Copy link
Owner

Done: #115

@mfcochauxlaberge mfcochauxlaberge linked a pull request Jul 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants