Assert that request verb is POST

http-verbs, php, request

Solution

This should work:

if ($_SERVER['REQUEST_METHOD'] != 'POST') die();

Problem

How do you ensure early enough in the PHP request pipeline the verb is POST and deny others?

Original source