api2go
api2go copied to clipboard
Is it possible to setup a redirect under the FindAll method
Hey,
I'm looking to implement a 3xx redirect for the FindAll method, such that it redirects to a url with a paginated response.
For example, a GET api/v1/users should redirect to api/v1/users?page[offset]=0&page[limit]=10
do you recommend a way to have this done from within api2go, since handlers for these paths are being managed by api2go.
Thanks for any help :)
No this is currently not supported by api2go directly. I think if we want to support this, we should add more customization options into the Response. You could already set the status code, but not the content where to redirect to