I have the following controller method:
[HttpPost]
[Route("SomeRoute")]
public byte[] MyMethod([FromBody] string ID)
{
byte[] mybytearray = db.get
Instead of this
mybytearray = response.Content.ReadAsByteArrayAsync().Result;//Here is the problem
Use this
string result=null;
result = response.Content.ReadAsStringAsync().Result.Replace("\"", string.Empty);
mybytearray=Convert.FromBase64String(result);
response was returning the byte array as base64encoded.