【发布时间】:2015-03-29 01:51:04
【问题描述】:
我正在尝试这样请求:
$body = [];
$body['holder_name'] = $full_name;
$body['bank_code'] = $bank_number;
$body['routing_number'] = $branch_number;
$body['account_number'] = $account_number;
$body['type'] = 'checking';
$client = new GuzzleHttp\Client([
'base_url' => [$url, []],
'headers' => ['content-type' => 'application/json', 'Accept' => 'application/json'],
'defaults' => [
'auth' => [$publishable_key, ''],
],
'body' => json_encode($body),
]);
问题是这个请求是在没有 Content-Type 的情况下设置的。 我做错了什么?
【问题讨论】: