add http request factory pattern