I have no idea how to get the HTTP headers with Mason. I only know that $m is the Mason Request Class.
You could try:
$ENV{'REQUEST_METHOD'}