0
我有一個很難翻譯下面的curl命令與狂飲PHP庫中使用:捲曲到PHP狂飲
curl -v -X POST --form 'metadata={"name":"test","kind":"FILE"}' --form '[email protected]/tmp/test.txt' 'https://my-endpoint.example.com'
我認爲這將是沿着這條,但它似乎沒有不工作:
$response = $this->httpClient->post('http://my-endpoint.example.com', [
'body' => [
'metadata' => '{"name":"test","kind":"FILE"}',
'content' => "@/tmp/test.txt",
]
]);