title: RestSharp no cookies on response object
body: <p>I'm having an issue trying to write a bot for a simple browser game.</p>
  
  <p>The game can be found here <a href="http://en.gladiatus.gameforge.com/game/" rel="nofollow">http://en.gladiatus.gameforge.com/game/</a>.</p>
  
  <p>The problem is that after I login, i need to get the cookie that is going to be used on future requests, but the RestResponse.Cookies is always empty.</p>
  
  <p>Here's a working login code that should illustrate my problem.</p>
  
  <pre><code>public bool DoLogin() {
      var client = new RestClient("http://s2.en.gladiatus.gameforge.com"); //Server 2 on England.
      var request = new RestRequest( "/game/index.php?mod=start&amp;submod=login", Method.POST );
      request.AddHeader( "Content-Type", "application/x-www-form-urlencoded" );
      request.AddParameter( "name", "bot_test"); //test account.
      request.AddParameter( "pass", "bot_test_pass");
  
      var response = client.Execute( request );
  
      var match = System.Text.RegularExpressions.Regex.Match( 
          response.Content, 
          "href=\"index\\.php\\?mod=news&amp;submod=serverEvents&amp;sh=([^&amp;]*?)\"" );
  
      var _Successful = match.Success;
  
      MessageBox.Show( response.Cookies.Count.ToString() ); //Always 0
  
      if(!_Successful) //Could not login.
          return false;
  
      var _SecureHash = match.Groups[0].Value;
  
      return _Successful;
  }
  </code></pre>
  
  <p>I tried everything that I know (which is not much) but I couldnt find what is wrong with my code. </p>
  
  <p>Thanks for reading!</p>