I'm having a hard time translating the following curl command to be used with the Guzzle PHP library:
curl -v -X POST --form 'metadata={"name":"test","kind":"FILE"}' --form 'content=@/tmp/test.txt' 'https://my-endpoint.example.com'
I thought it would be along this, but it doesn't seem to work:
$response = $this->httpClient->post('http://my-endpoint.example.com', [
'body' => [
'metadata' => '{"name":"test","kind":"FILE"}',
'content' => "@/tmp/test.txt",
]
]);