title: How can I use rest sharp to call this method
body: <p>I have a rest api defined as FruitFactory.svc,</p>
  
  <pre><code>  &lt;%@ ServiceHost Debug="true" Language="C#" 
   Service="LocalFarm.WebServices.Internal.FruitFactory, 
   LocalFarm.WebServices.Internal, Version=1.0.0.0, Culture=neutral, 
   PublicKeyToken=23j26b5f532c68dj" %&gt;
  </code></pre>
  
  <p>web config is,</p>
  
  <p>
  
    
      
        
          
          
        
      </p>
  
  <pre><code>&lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="Localfarm_BasicHttpBinding" maxReceivedMessageSize="104857600"&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="InheritedFromHost" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="myBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>Address is,</p>
  
  <pre><code>https://portal.localFarm.com/2240AM/136/_vti_bin/internal/fruitfactory.svc
  </code></pre>
  
  <p>How can I make a rest call to it using rest sharp api ?</p>
  
  <pre><code>[DataContract]
  public class FileObject
  {
      [DataMember]
      public string orderName;
      [DataMember]
      public byte[] data;
  }
  
  [ServiceContract]
  public interface IFruitFactory
  {
      [OperationContract]
      FileObject[] GetInvoices(string customerID, string invoiceFolder, string customerName, string[] orderNames);
  }
  </code></pre>
  
  <p>Tried this so far,</p>
  
  <pre><code>var client = new RestClient("https://portal.localFarm.com/2240AM/136/_vti_bin/internal/fruitfactory.svc");
  client.Authenticator = new HttpBasicAuthenticator("username", "password");
  
  var request = new RestRequest(Method.GET);
  </code></pre>
  
  <p>Not sure what to do next...</p>