我对Guzzle发送帖子文件有疑问。在API中,我有方法输入,例如文件(对于文件),名称和isPublic。我不知道如何发送这两个附加参数(文件名和isPublic,也许我理解错误的多部分参数?
我的例子
$response = $client->request('POST', 'http://www.example.com/files/post', [
'multipart' => [
[
'name' => 'files' - its input name in api for files?
'contents' => fopen('path/to/file', 'r')
'filename' => 'csv_header.csv'
//Should I add additional param name and isPublic in this array, or somewhere else?
]]]
请咨询。谢谢:)