title: .NET Core HttpClient upload byte array gives unsupported media type error
body: <p>I'm trying to upload a simple byte array for my Web Api controller (ASP.NET Core 3)</p>
  
  <pre><code>using var client = new HttpClient() { BaseAddress = new Uri("http://someUrl.com/") };
  var body = new ByteArrayContent(new byte[] {1, 2, 3});
  
  var result = await client.PostAsync("api/somecontroller/content?someField=someData", body);
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>[HttpPost("content")]
  public IActionResult Upload([FromBody]byte[] documentData, [FromQuery] string someField)
  {
      ...
  
      return Ok();
  }
  </code></pre>
  
  <p>but this gives me the error <code>415 Unsupported media type</code>. Why ? I need to put some additional data in the url, but I don't think that's the issue here.</p>