title: How to download files using RestSharp? Specifically what do I pass to request?
body: <p>Hello I am new to c# am struggling to find what I have to do in order to download a file after having logged in. 
  This is my code thus far.</p>
  
  <pre><code>using System;
  using RestSharp;
  using RestSharp.Authenticators;
  using RestSharp.Extensions;
  
  namespace Updater
  {
      class MainClass
      {
          public static void Main(string[] args)
          {
              var client = new RestClient("xxxxxx");
              client.CookieContainer = new System.Net.CookieContainer();
              client.Authenticator = new SimpleAuthenticator("xxxx", "xxx", "xxx", "xxxx");
              var request = new RestRequest("/login", Method.POST);
  
  
              client.ExecuteAsync(request, response =&gt;
              {
                  Console.WriteLine(response.Content);
              });
  
              Console.ReadLine();
              Console.ReadKey();
          }
  
  
  
  
      }
  }
  </code></pre>
  
  <p>Now I know that in order to download the file I want I'll have to use this piece of code.</p>
  
  <p><code>client.DownloadData(request).SaveAs(path)</code></p>
  
  <p>How do I actually use this? What would be the request, and can I list path as "~/Desktop"?</p>