refactoring to httpy interface
refactoring to httpy interface