title: How to pass client certificate through HTTP Client in php laravel 8
body: <p>How to pass client certificate (2 files .key and .pem) through http client request?
  I need to include those files in the below http post request to be able to talk with the server.</p>
  <pre><code>$response = Http::post('https://domainname.com/api/client/session', array('xxx' =&gt; array('xx' =&gt; 'xxxx')));
  </code></pre>
  <p>I am able to do it using phpCurl like below:</p>
  <pre><code>$curl = curl_init();
          curl_setopt_array($curl, array(
              CURLOPT_URL =&gt; $url,
              CURLOPT_RETURNTRANSFER =&gt; true,
              CURLOPT_ENCODING =&gt; '',
              CURLOPT_MAXREDIRS =&gt; 10,
              CURLOPT_TIMEOUT =&gt; 0,
              CURLOPT_FOLLOWLOCATION =&gt; true,
              CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST =&gt; $type,
              CURLOPT_POSTFIELDS =&gt; $body,
              CURLOPT_HTTPHEADER =&gt; $header,
              CURLOPT_SSLKEY =&gt; $pemPath,
              CURLOPT_SSLCERT =&gt; $crtPath,
              // CURLOPT_NOSIGNAL =&gt; 1
  
          ));
  
          $response = curl_exec($curl);
  
  
          $err = curl_error($curl);
  
          curl_close($curl);
  
          echo (json_encode($response));
          echo (&quot;\n\n&quot;);
          if ($err) {
              return [&quot;success&quot; =&gt; false, &quot;message&quot; =&gt; $err];
          } else {
              return [&quot;success&quot; =&gt; true, &quot;data&quot; =&gt; json_decode($response)];
          }
  </code></pre>
  <p>But I need to do it using Http Client for many other purposes. Any suggestion?</p>