split mkRequest into mkRequest and sendHTTPRequest to make internal functions more reuseable