|
|
|
|
|
by querulous
2269 days ago
|
|
sure. what i mean is by opting in to `use Phoenix.Controller` you are also opting into `MyApp.PageController`, `MyApp.Endpoint`, `MyApp.PageView`, `MyApp.ErrorView`, `MyApp.LayoutView`... which are all modules you include via macros in your actual implementation (or which are included by other includes) all of these modules assume a traditional server rendered html environment with appropriate CORS, session handling, form security, etc none of which are particularly relevant to returning json from an api request it is possible to opt out and directly manipulate the Plug conn (and set the response) but at that point Phoenix is bringing almost nothing to the table |
|