Skip to content

Commit c747d81

Browse files
author
Cory Isakson
committed
handle null index param
1 parent 9f0fe25 commit c747d81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clients/dotnet/WebClient/MemoryWebClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ public async Task<StreamableFileContent> ExportFileAsync(
242242
string? index = null,
243243
CancellationToken cancellationToken = default)
244244
{
245-
string requestUri = $"{Constants.HttpDownloadEndpoint}?index={index}&documentId={documentId}&filename={fileName}";
245+
string indexParam = index != null ? $"index={index}&" : "";
246+
string requestUri = $"{Constants.HttpDownloadEndpoint}?{indexParam}documentId ={documentId}&filename={fileName}";
246247
HttpResponseMessage? response = await this._client.GetAsync(requestUri, cancellationToken).ConfigureAwait(false);
247248

248249
response.EnsureSuccessStatusCode();

0 commit comments

Comments
 (0)