El compositor requiere GuzzleHttp/Guzzle
To install guzzlehttp
composer require guzzlehttp/guzzle
Ref : https://packagist.org/packages/guzzlehttp/guzzle
Gentle Gemsbok
To install guzzlehttp
composer require guzzlehttp/guzzle
Ref : https://packagist.org/packages/guzzlehttp/guzzle
$response = $client->request('POST', 'http://httpbin.org/post', [
'form_params' => [
'field_name' => 'abc',
'other_field' => '123',
'nested_field' => [
'nested' => 'hello'
]
]
]);
$client = new GuzzleHttp\Client();
$response = $client->get('http://www.server.com/endpoint', [
'auth' => [
'username',
'password'
]
]);
$post_data = array(
'title' => 'My work',
'description' => 'This is a request created using curl',
'submit' => 'submit',
);
$response = $http_client->post('/create.php', array(), $post_data)->send();