title: How to send Cookie using PHP Goutte
body: <p>I have this code in PHP Goutte</p>
  
  <pre><code>$client = new GuzzleHttp\Client([
          'base_uri' =&gt; 'http://www.yellowpages.com.au',
          'cookies' =&gt; true,
          'headers' =&gt;  [
              'Accept'          =&gt; 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
              'Accept-Encoding' =&gt; 'zip, deflate, sdch', 
              'Accept-Language' =&gt; 'en-US,en;q=0.8', 
              'Cache-Control'   =&gt; 'max-age=0',
              'User-Agent'      =&gt; 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0'
          ]
      ]);
  </code></pre>
  
  <p>I want to send my custom Cookie to server</p>
  
  <p>Usually I do it this way using simple cURL </p>
  
  <pre><code>$a_curl_opts = array(
      CURLOPT_NOBODY =&gt; 0,
      CURLOPT_RETURNTRANSFER =&gt; 1,
      CURLOPT_COOKIEFILE =&gt; $file_cook,
      CURLOPT_COOKIEJAR =&gt; $file_cook,
  );
  curl_setopt_array($curl_init, $a_curl_opts);
  </code></pre>
  
  <p>And I saw somewhere this thing to do in Goutte</p>
  
  <pre><code>$client-&gt;getClient()-&gt;setDefaultOption('config/curl/'.CURLOPT_COOKIEFILE, $file_cook); 
  $client-&gt;getClient()-&gt;setDefaultOption('config/curl/'.CURLOPT_COOKIEJAR, $file_cook); 
  </code></pre>
  
  <p>But I am getting this error.</p>
  
  <pre><code>Catchable fatal error: Argument 3 passed to GuzzleHttp\Client::request() must be of the type array, string given, called in D:\Ampps\www\gum\vendor\guzzlehttp\guzzle\src\Client.php on line 87 and defined in D:\Ampps\www\gum\vendor\guzzlehttp\guzzle\src\Client.php on line 126
  </code></pre>