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
I have build a custom api. With the following URL's:
/api/*
/api/*/*
However I have overridden one as follows:
/api/customers
/api/customers/*
You can already guessed it :-) Pods does not use /api/customers/* at all.
I have for example this request: /api/customers/121. Instead it requests /api//
I know you will add it to your todo list, but is there a small fix for it?
Edit: Pods version 2.5.1.1 (latest)
Also tested with Pods 2.4.3.
The text was updated successfully, but these errors were encountered:
I would actually not recommend having two different sets of pages. Instead I would have one set, but include a different WordPress Template for rendering the results with if the url has "customers" in it. You should be able to do this with the pods_page_template filter.
In the callback use parse_url() and see if "customers" is in the array that returns. If so change the return value, which is the path, relative to your theme/child theme for the template, which will be loaded using locate_template().
Nice solution to include a different template. But I think it would not pass down any HTTP headers?
The problem I see is that the /api/customers/* Pod Page needs the HTTP Header 'Authentication' to check the Bearer that the client sends with it from an Ajax POST call to it.
Excuse me for that complex sentence ;-)
But that is really my problem. I do not use any Wordpress page. I use only the Pod Page content.
Hi,
I have build a custom api. With the following URL's:
However I have overridden one as follows:
You can already guessed it :-) Pods does not use /api/customers/* at all.
I have for example this request: /api/customers/121. Instead it requests /api//
I know you will add it to your todo list, but is there a small fix for it?
Edit: Pods version 2.5.1.1 (latest)
Also tested with Pods 2.4.3.
The text was updated successfully, but these errors were encountered: