Return to v2.0 docs

processRequest()


Controller Miscellaneous Functions any controller model migrator


Creates a controller and calls an action on it. Which controller and action that's called is determined by the params passed in. Returns the result of the request either as a string or in a struct with body, emails, files, flash, redirect, status, and type. Primarily used for testing purposes.

Name Type Required Default Description
params struct Yes The params struct to use in the request (make sure that at least controller and action are set).
method string No get The HTTP method to use in the request (get, post etc).
returnAs string No Pass in struct to return all information about the request instead of just the final output (body).
rollback string No false Pass in true to roll back all database transactions made during the request.

Related Functions

Miscellaneous Functions