Fatal error: Call to undefined method GuzzleHttp\Message\Response::send() in /home/familysearch/public_html/index.php on line 59

1,684 views
Skip to first unread message

Larene Spitler

unread,
Dec 23, 2014, 5:21:35 PM12/23/14
to guz...@googlegroups.com
I built a Red Hat Linux cPanel server with Apache 2.2 and PHP 5.4

I installed Composer and Guzzle 4.

This is my code:

require  'vendor/autoload.php';
use GuzzleHttp\Client;

"?grant_type=authorization_code" . 
"&client_id=WCQY-7J1Q-GKVV-7DNM-SQ5M-9Q5H-JX3H-CMJK" . 
"&code=" . $code; 
#echo "url=$url<br>";
$client = new Client();
$request = $client->post($url);
$request->addHeader('Accept', 'application/json');
$request->addHeader('Content-Type', 'application/x-www-form-urlencoded');
$response = $request->send();

Was I supposed to install something else?

Larene

Michael Dowling

unread,
Dec 23, 2014, 5:47:21 PM12/23/14
to guz...@googlegroups.com
Guzzle 4 is no longer supported. Can you upgrade to guzzle 5?
--
You received this message because you are subscribed to the Google Groups "Guzzle - PHP HTTP client and REST client framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guzzle+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Dowling

unread,
Dec 23, 2014, 6:24:28 PM12/23/14
to guz...@googlegroups.com
Also: the post() method returns a response object not a request and therefore has no send() method.

On Dec 23, 2014, at 4:21 PM, Larene Spitler <lar...@theforexmom.com> wrote:

--

Larene Spitler

unread,
Jan 2, 2015, 2:14:50 PM1/2/15
to guz...@googlegroups.com
I am trying to install guzzle 5.

{
   "require": {
      "guzzlehttp/guzzle": "~5.0"
   }
}
is my composer.json

Errors:

[~/public_html]# php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package guzzlehttp/guzzle could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Larene Spitler

unread,
Jan 5, 2015, 1:05:59 PM1/5/15
to guz...@googlegroups.com
I successfully installed guzzle 5!
Larene
Reply all
Reply to author
Forward
0 new messages