I am trying to upload file and send post parameters at the same time like this:
$response = $client->post('http://example.com/api', [
'form_params' => [
'name' => 'Example name',
],
'multipart' => [
[
'name' => 'image',
'contents' => fopen('/path/to/image', 'r')
]
]
]);
However my form_params fields are ignored and only the multipart fields are present in my post body. Can I send both at all with guzzle 6.0 ?