Move HTTP request related code into a `request` package