move HTTP utils to own file