public static async Task <ResponseMessage> SendAsync( this HttpTransporter httpTransporter, HttpMethod method, Uri requestUri, HttpRequestHeaders headers, HttpContent content, CancellationToken cancellationToken) { if (httpTransporter == null) { throw new ArgumentNullException(nameof(httpTransporter)); } var message = new RequestMessage( httpTransporter.ProtocolVersion, requestUri, method.ToString(), headers.ToHeaderCollection(), await content.ReadAsStreamAsync() ); return(await httpTransporter.SendAsync(message, cancellationToken)); }