Jader Dias
Jader Dias

Reputation: 90583

How to find out the HTTP method of the current request?

I have no idea how to get the HTTP headers with Mason. I only know that $m is the Mason Request Class.

Upvotes: 2

Views: 894

Answers (2)

Leeft
Leeft

Reputation: 3837

Mason itself doesn't deal with HTTP as it is essentially just a templating system. The HTTP transport would be handled by Plack through say Poet or Catalyst, and that's where you should obtain the headers from. But as you haven't mentioned what you're using alongside of Mason, I can't tell you where to look.

Upvotes: 1

Cole Tierney
Cole Tierney

Reputation: 10324

You could try:

$ENV{'REQUEST_METHOD'}

Upvotes: 5

Related Questions