Dileep Singh

Dileep Singh

  • NA
  • 46
  • 8.1k

How to parse the File response from API in mvc Core

Feb 27 2020 12:57 PM
Hi,there I have created the API for getting image which is looks like this..
  1. [HttpGet]  
  2. public IActionResult Get()  
  3. {  
  4. Byte[] b = System.IO.File.ReadAllBytes(@"E:\\Test.jpg");  
  5. // You can use your own method over here.  
  6. return File(b, "image/jpeg");  
  7. }  
Now i want to consume this api in another application which is in mvc core 3.0 I m calling api using HttpClient.. Getting response from the api but not able to parse that response.. Any suggestions

Answers (1)