title: FileContentResult works, but downloading to byte array doesn't
body: <p>I am trying to convert HTML to a PDF file.</p>
  
  <p>I have the following controller:</p>
  
  <pre><code>    public ActionResult Offer([FromBody] DocumentTemplateInvoiceViewModel vm)
      {
          return this.Pdf(nameof(Offer), vm, "test.pdf");
      }
  </code></pre>
  
  <p>When I do a POST here, I get back the file and it can open. Happy days!</p>
  
  <p>However, if I try to do the following:</p>
  
  <pre><code>    var termsClient = new RestClient(ConfigurationManager.AppSettings["HostingUrl"]);
      var termsRequest = new RestRequest("/Document/Offer", Method.POST);
      termsRequest.AddJsonBody(vm);
      var json = JsonConvert.SerializeObject(vm);
      var termsBytes = termsClient.DownloadData(termsRequest);
      File.WriteAllBytes("LOCALPATH",termsBytes );
  </code></pre>
  
  <p>The file is corrupt, and I cannot open the PDF. It has some size, so it stores some bytes. Probably just not stored correctly :D</p>
  
  <p>Any idea what I am doing wrong? Why is the FileContentResult from my controller working, but when I download the data it's corrupt?</p>