form_params
摘要
用来发送一个 application/x-www-form-urlencoded POST请求.
类型
array
常量
GuzzleHttp\RequestOptions::FORM_PARAMS
关联数组由表单字段键值对构成,每个字段值可以是一个字符串或一个包含字符串元素的数组。 当没有准备 “Content-Type” 报文头的时候,将设置为 “application/x-www-form-urlencoded”。
$client->request('POST', '/post', [
'form_params' => [
'foo' => 'bar',
'baz' => ['hi', 'there!']
]
]);