$response = $client->request('POST', 'http://httpbin.org/post', [
'form_params' => [
'field_name' => 'abc',
'other_field' => '123',
'nested_field' => [
'nested' => 'hello'
]
]
]);
$client = new GuzzleHttpClient();
$response = $client->get('http://www.server.com/endpoint', [
'auth' => [
'username',
'password'
]
]);
$client = new Client([(['base_uri' => 'https://reqres.in/']);
$response = $client->request('GET', '/api/users?page=1');
echo $response->getBody();