Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Routes cannot be both GET and POST #34

@Gabelbombe

Description

@Gabelbombe

You cannot have a route that is GET and POST, it will default to the later unlike typical Slim which will support either of a type:

$app->addRoutes([
    '/'  => [ 'GET' => [ 'Home:index', function()
    {
        die('GET');
    }]],

    '/'  => [ 'POST' => [ 'Home:index', function()
    {
        die('POST');    // curl -X POST localhost:80
    }]],
]);

$app->notFound(function () USE ($app)
{
    header('Content-type: text/plain');
    echo 'Broken...';
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions