http util update (refactor)