Use enum instead of define for HTTP constants
Remove unnecessary parameters in util functions