public async Task <IActionResult> DownloadReport(string specificationReportId) { ApiResponse <SpecificationsDownloadModel> response = await _specificationsApiClient.DownloadSpecificationReport(specificationReportId); if (response.StatusCode == HttpStatusCode.OK) { WebClient client = new WebClient(); byte[] data = client.DownloadData(response.Content.Url); FileContentResult fileContentResult = new FileContentResult(data, "text/csv") { FileDownloadName = response.Content.FileName }; return(fileContentResult); } return(new BadRequestResult()); }