A benefit of this approach is that you can check to see if the request requires json and return the resource directly, that way you can have the same controller method handle api and web requests without duplication.
This is what I have done with one application that has a mobile app needing to communicate on some endpoints.
A benefit of this approach is that you can check to see if the request requires json and return the resource directly, that way you can have the same controller method handle api and web requests without duplication.
This is what I have done with one application that has a mobile app needing to communicate on some endpoints.
Hey, neat idea.
How exactly would you do this?
Can you provide an example please?