in reply to post and get

Use the CGI module and you don't have to bother about the request method.
But if you need it anyway, use CGI's request_method() function.