Skip to content

Commit b1f3efd

Browse files
committed
[Fix] RedmineManager add requestOptions to DownloadFile
1 parent 4685fcc commit b1f3efd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/redmine-net-api/IRedmineManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,14 @@ void Delete<T>(string id, RequestOptions requestOptions = null)
106106
/// </returns>
107107
/// <exception cref="RedmineException"></exception>
108108
Upload UploadFile(byte[] data, string fileName = null);
109-
109+
110110
/// <summary>
111111
/// Downloads a file from the specified address.
112112
/// </summary>
113113
/// <param name="address">The address.</param>
114+
/// <param name="requestOptions"></param>
114115
/// <param name="progress"></param>
115116
/// <returns>The content of the downloaded file as a byte array.</returns>
116117
/// <exception cref="RedmineException"></exception>
117-
byte[] DownloadFile(string address, IProgress<int> progress = null);
118+
byte[] DownloadFile(string address,RequestOptions requestOptions = null, IProgress<int> progress = null);
118119
}

src/redmine-net-api/RedmineManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ public Upload UploadFile(byte[] data, string fileName = null)
200200
}
201201

202202
/// <inheritdoc />
203-
public byte[] DownloadFile(string address, IProgress<int> progress = null)
203+
public byte[] DownloadFile(string address, RequestOptions requestOptions = null, IProgress<int> progress = null)
204204
{
205-
var response = ApiClient.Download(address, progress: progress);
205+
var response = ApiClient.Download(address, requestOptions, progress: progress);
206206

207207
return response.RawContent;
208208
}

0 commit comments

Comments
 (0)