detect get or post method