api2go icon indicating copy to clipboard operation
api2go copied to clipboard

Is it possible to setup a redirect under the FindAll method

Open joelrebel opened this issue 6 years ago • 1 comments

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

joelrebel avatar Apr 23 '19 11:04 joelrebel

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

wwwdata avatar May 06 '19 06:05 wwwdata