PHPUnit - REST API testing
PHP Snippet 1:
$response = $this->call('POST', '/api/v1.0/pages', $parameters);
$data = $response->getData();
PHP Snippet 2:
var_dump($response->getBody()->getContents());
PHP Snippet 3:
$client = new GuzzleHttp\Client();
$response = $client->get('http://192.168.99.100/v1/hello');
var_dump($response->getBody()->getContents());
PHP Snippet 4:
string(13) "{"bar":"foo"}"