Ejemplo 1: el compositor requiere guzzlehttp / guzzle
To install guzzlehttp
composer require guzzlehttp/guzzle
Ref : https://packagist.org/packages/guzzlehttp/guzzle
Ejemplo 2: use el cliente http de guzzle laravel
public function putGuzzleRequest()
{
$client = new GuzzleHttpClient();
$url = "http://myexample.com/api/posts/1";
$myBody['name'] = "Demo";
$request = $client->put($url, ['body'=>$myBody]);
$response = $request->send();
dd($response);
}
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)