Skip to content

Optionally allow GET requests to reach controllers #25

Description

@pointybeard

Currently there is a hard 'no' on GET requests which prevents them from getting to the controller. Instead, in the Controller event, it drops out and lets Symphony handle it internally before the JSON result is then rendered. See:

if ($request->getMethod() == 'GET') {

It would be nice if there was a way to indicate that GET requests need to go through to the controller. Perhaps it's as simple as checking for a get() method on the controller like the other HTTP request methods do. The logic for this could go here:

// Throw an exception if it cannot be located.
if (!class_exists($controllerPath)) {
throw new Lib\Exceptions\ControllerNotFoundException($controllerPath);
}

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions