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

Is it possible to setup a redirect under the FindAll method #326

Open
joelrebel opened this issue Apr 23, 2019 · 1 comment
Open

Is it possible to setup a redirect under the FindAll method #326

joelrebel opened this issue Apr 23, 2019 · 1 comment

Comments

@joelrebel
Copy link

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 :)

@wwwdata
Copy link
Member

wwwdata commented May 6, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants