Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl getResponseCookies says undifined method #305

Closed
hayesrobin opened this issue Mar 8, 2016 · 4 comments
Closed

curl getResponseCookies says undifined method #305

hayesrobin opened this issue Mar 8, 2016 · 4 comments

Comments

@hayesrobin
Copy link

When I was tried to get all response cookies listed it says this error -->

PHP Fatal error:  Call to undefined method Curl\Curl::getResponseCookies() in 

my code is -->

require 'vendor/autoload.php';

use \Curl\Curl;

$curl = new Curl();
$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
$curl->setOpt(CURLOPT_FOLLOWLOCATION, true);
$curl->get('https://example.com');

if ($curl->error) {
    echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage;
} else {
    echo $curl->response;
}

var_dump($curl->getResponseCookies());

But $curl->getCookie() is working good

@zachborboa
Copy link
Member

Hi. Please pull in the latest version (4.11.0) which includes getResponseCookies. Thank you

@ruslanbakanov
Copy link

"Fatal error: Call to undefined method Curl\Curl::getResponseCookies()"

Hello!
The same situation
And i just clone repository and have the latest version :)

@luisfavila
Copy link

I don't thing there's a getResponseCookies but a getResponseCookie only. I was searching for this too @ruslanbakanov

@zachborboa
Copy link
Member

@hayesrobin @ruslanbakanov @luisfavila my mistake. There's no getResponseCookies() method. You can simply use $curl->responseCookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants