http client solution, exercise 7