setting http method using constant rather than str