use HttpMethod enum instead of int