php - Guzzle argument with [] fail to recognize as array -
in example of oficial documentation of guzzle:
$request = $client->createrequest('put', 'http://httpbin.org/put', ['body' => 'testing...']);
but:
"argument 3 passed guzzlehttp\client::request() must of type array, string given"
php version: php 5.5.9-1ubuntu4.9 (cli)
is version of php or code lack of something?
looks argument 3 must array
try
$request = $client->createrequest('put', 'http://httpbin.org/put', array('body' => 'testing...'));
read more here arrays , structuring
Comments
Post a Comment