Reputation: 59
i am re-factoring an old class to Laravel.
The old class use curl with an option
curl_setopt($curl, CURLOPT_BUFFERSIZE, 131072);
With Laravel i use GuzzleHttp\Client and i can't find any parameter for buffer size
Does anyone know how to set buffer size or any equivalent parameter to GuzzleHttp\Client ?
Upvotes: 0
Views: 752
Reputation: 3420
You can use your custom curl options in guzzle, just use curl
request option.
// $client : Your guzzlehttp instance
$client->request('GET', '/', [
'curl' => [
CURLOPT_BUFFERSIZE => 131072
]
]);
You can also add it within guzzle instance.
$client = new \GuzzleHttp\Client(['curl' => [\CURLOPT_BUFFERSIZE => 131072]]);
Refer Here
Upvotes: 0