Open 4n70w4 opened 5 years ago
same problem, goutte is ignoring the guzzle client completely (ignores the cookie jar as well)
try:
new \GuzzleHttp\Client(['headers' => ['User-Agent' => null]]);
@sunnysideup what for?
Ignore my comments, I thought it was helpful, but perhaps it is not.
@4n70w4 @bilalghouri Hey! Did you find a solution?
It's 2020, but I have same problem with "guzzlehttp/guzzle": "^6.3",
and "fabpot/goutte": "^3.2",
. I know that there is goutte v.4 available now, but it uses symfony httpClient, but it's new and there's no time for refactoring my code unfortunately..
try:
$transport= new Client(['HTTP_USER_AGENT' => 'Mozilla/5.0]);
Guzzle code:
Goutte code:
Guzzle result:
Goutte result:
user-agent
header.host
header.