Symfony - 在 yml 注册时 Guzzle return 错误
Symfony - Guzzle return error when registering at yml
我正在使用 Symfony 2.7 和 Guzzle 5.3。
我的services.yml:
ma_api.client:
class: 'GuzzleHttp\Client'
我的错误是:
request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "No method can handle the client config key" at /home/vsilvestre/Projets/front-mobileangelo/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php line 360 {"exception":"[object] (InvalidArgumentException(code: 0): No method can handle the client config key at /home/vsilvestre/Projets/front-mobileangelo/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php:360)"} []
如果有人能帮助我..谢谢!
解决方案是 "easy"。
我的问题是我的要求,而不是注册。
$this->get('ma_api.client')->post('v2/leads', [
'eukera' => 'client'
]);
选项不再是正文,它是需要像 'body' => [content]
一样构建的选项
我关闭它。 (感谢编辑。)
我正在使用 Symfony 2.7 和 Guzzle 5.3。
我的services.yml:
ma_api.client:
class: 'GuzzleHttp\Client'
我的错误是:
request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "No method can handle the client config key" at /home/vsilvestre/Projets/front-mobileangelo/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php line 360 {"exception":"[object] (InvalidArgumentException(code: 0): No method can handle the client config key at /home/vsilvestre/Projets/front-mobileangelo/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php:360)"} []
如果有人能帮助我..谢谢!
解决方案是 "easy"。
我的问题是我的要求,而不是注册。
$this->get('ma_api.client')->post('v2/leads', [
'eukera' => 'client'
]);
选项不再是正文,它是需要像 'body' => [content]
一样构建的选项我关闭它。 (感谢编辑。)