Answers.Body: <p>Actually the class to be used should be:</p>
  <p>$client = new GuzzleHttp\Client();</p>
  <p>without the first back slash</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T15:45:07.057Z
Answers.Text: This should be posted as comment on the accepted answer, which includes the bulk of this information—but may contain syntactic issues for some environments.
Answers.UserDisplayName: August Miller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-15T20:51:34.247Z
Answers.LastActivityDate: 2021-10-15T20:51:34.247Z
Answers.UserDisplayName: kelvin2710
Answers.Body: <p>Just a quick guess, but here is what I have on a project I am working on.    </p>
  
  <pre><code>$client = new \Guzzle\Http\Client();
  $request = $client-&gt;get($url);
  </code></pre>
  
  <p><strong>yours</strong></p>
  
  <pre><code>$client = new \GuzzleHttp\Client();
  </code></pre>
  
  <p><strong>mine</strong></p>
  
  <pre><code>$client = new \Guzzle\Http\Client();
  </code></pre>
  
  <p>I have <code>\Http\Client</code> - maybe you are just missing the slash?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-13T18:29:57.183Z
Answers.Text: What's weird though is its been working like this for a while. Maybe a plugin update has caused this, I'm not sure.
Answers.UserDisplayName: James White
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-13T18:36:52.973Z
Answers.Text: I get `Call to undefined method Guzzle\Http\Client::request()` when using that version for $client.
Answers.UserDisplayName: James White
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-13T18:27:32.620Z
Answers.LastActivityDate: 2017-12-13T18:27:32.620Z
Answers.UserDisplayName: Damon
Body: <p>A plugin that is using a Guzzle request is now throwing an exception that the class cannot be found.</p>
  
  <p>I'm running Craft CMS 2.6.3000. Where is Guzzle being pulled from? I can see it within <code>craft/app/vendor/guzzle</code> and also within <code>plugins/oauth/vendor</code> but for some reason this plugin cannot cannot use this class anymore.</p>
  
  <p>It is being referenced as <code>$client = new \GuzzleHttp\Client();</code></p>
  
  <p>Why can't the class be used?</p>
  
Tags: <guzzle>
Title: Class 'GuzzleHttp\Client' not found
ThreadText: # Class 'GuzzleHttp\Client' not found
  
  (Asked by: username_0 on 2017-12-13)
  
  A plugin that is using a Guzzle request is now throwing an exception that the class cannot be found.
  
  I'm running Craft CMS 2.6.3000. Where is Guzzle being pulled from? I can see it within `craft/app/vendor/guzzle` and also within `plugins/oauth/vendor` but for some reason this plugin cannot cannot use this class anymore.
  
  It is being referenced as `$client = new \GuzzleHttp\Client();`
  
  Why can't the class be used?
  
  **Tags:** guzzle
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-10-15. Score: 1
  
  Actually the class to be used should be:
  
  $client = new GuzzleHttp\Client();
  
  without the first back slash
  
  > **Comments:**
  > **username_2**: This should be posted as comment on the accepted answer, which includes the bulk of this information—but may contain syntactic issues for some environments.  
  
  ---
  
  ### Answer by username_3 on 2017-12-13. Score: 1
  
  Just a quick guess, but here is what I have on a project I am working on.
  
  ```
  $client = new \Guzzle\Http\Client();
  $request = $client->get($url);
  
  ```
  
  **yours**
  
  ```
  $client = new \GuzzleHttp\Client();
  
  ```
  
  **mine**
  
  ```
  $client = new \Guzzle\Http\Client();
  
  ```
  
  I have `\Http\Client` - maybe you are just missing the slash?
  
  > **Comments:**
  > **username_0**: What's weird though is its been working like this for a while. Maybe a plugin update has caused this, I'm not sure.  
  > **username_0**: I get `Call to undefined method Guzzle\Http\Client::request()` when using that version for $client.  
  
  ---
  
  