my question is simple. I don't understand why I can't get the HTML body of this request on Guzzlehttp:
$client = new \GuzzleHttp\Client(['base_uri' => 'https://en.wikipedia.org/wiki/']);
$response = $client->get('PHP');
dd($response->getBody(true));
The answer is:
Stream {#164 ▼
-stream: :stream {@10 ▶}
-size: null
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
What am I missing ?
Cast to a string or alternatively, use the following: