【发布时间】:2020-05-12 04:43:36
【问题描述】:
我已连接到我的 Google 表格,当我运行 https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create 的发布请求并且未设置任何属性时,它会创建一个新的电子表格。
我很想添加一个标题,所以我这样做了
$options = [
'form_params' => [
'properties' => [
'title' => 'A new title'
]
]
];
$client->post('v4/spreadsheets', $options);
我正在使用 Guzzle 进行此调用。作为回应,我在添加title 以形成参数时收到HTTP status code 400 (Bad Request)。
我该如何解决这个问题?
【问题讨论】:
标签: php google-api guzzle guzzle6