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