Add method ispost() to check if request method is POST

Add method ispost() to check if request method is POST