title: How to return a file using Web API?
body: <p>I am using <em>ASP.NET Web API</em>. <br/> I want to download a PDF with C# from the API (that the API generates).</p>
  
  <p>Can I just have the API return a <code>byte[]</code>? and for the C# application can I just do:</p>
  
  <pre><code>byte[] pdf = client.DownloadData("urlToAPI");? 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>File.WriteAllBytes()?
  </code></pre>