public Stream GetSignedDocuments(string envelopeId) { var uriTemplate = SignatureApiUriTemplates.BuildUriTemplate(SignatureApiUriTemplates.GetSignedEnvelopeDocuments); var parameters = new NameValueCollection { { "userId", UserId }, { "envelopeId", envelopeId } }; var template = new UriTemplate(uriTemplate); Uri url = template.BindByName(new Uri(BaseAddress), parameters); string signedUrl = UrlSignature.Sign(url.AbsoluteUri, PrivateKey); var request = new HttpRequestMessage { Method = "GET", Uri = new Uri(signedUrl) }; HttpContent content = request.Content; _client.DefaultHeaders.ContentLength = (content != null && content.HasLength() ? new long?(content.GetLength()) : null); OnSendingRequest(request); return(_client.Send(request).Content.ReadAsStream()); }