Dealing with path prefixes
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.
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.
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.
Done: https://github.com/mfcochauxlaberge/jsonapi/pull/115