move http method to util class