refactored to use HTTPService instead of direct calls to net/http