implemented sendRequest in HttpConnection