Created
March 9, 2020 18:49
-
-
Save kesselb/34a522300f9e1ad772241b4cda66bb85 to your computer and use it in GitHub Desktop.
Minimal working example to reproduce a guzzle issue with rss.kicker.de/news/2bundesliga
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$stream = | |
$client = new GuzzleHttp\Client([ | |
//'handler' => new \GuzzleHttp\Handler\CurlHandler(), // body size: 0 | |
'handler' => new \GuzzleHttp\Handler\StreamHandler(), // body size: 25965 | |
]); | |
$response = $client->get( | |
'http://rss.kicker.de/news/2bundesliga', | |
[ | |
'debug' => true, | |
] | |
); | |
echo 'Status code: ' . $response->getStatusCode() . "\n"; | |
echo 'Body size: ' . $response->getBody()->getSize() . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment