public async Task <IActionResult> OnPostTestOutputFileAsync() { if (!ModelState.IsValid) { return(BadRequest()); } HttpClient httpclient = clientFactory.CreateClient(); ProblemsClient client = new ProblemsClient(httpclient); try { FileResponse file = await client.GetTestOutputAsync(PostData.ProblemId, PostData.TestCaseId); return(File(file.Stream, "text/plain", $"test{PostData.TestCaseId}.out")); } catch { return(NotFound()); } }