public GetDownloadUriAsync ( string id, string versionId = null ) : Task |
||
id | string | Id of the file. |
versionId | string | Version of the file. |
Результат | Task |
public async Task<Uri> GetDownloadUriAsync(string id, string versionId = null)
{
id.ThrowIfNullOrWhiteSpace("id");
BoxRequest request = new BoxRequest(_config.FilesEndpointUri, string.Format(Constants.ContentPathString, id)) { FollowRedirect = false }
.Param("version", versionId);
IBoxResponse<BoxFile> response = await ToResponseAsync<BoxFile>(request).ConfigureAwait(false);
var locationUri = response.Headers.Location;
return locationUri;
}