Trying to use a PUT request in a Flowchart/Workflow and was only receiving a 400, whereas a raw curl worked correctly from the server. I tested a small fix by adding `http_build_query`, which corrected the issue:
> /Espo/Modules/Advanced/Core/Workflow/Actions/SendRequest.php
if (!$isGet) {
if ($isNotJsonPayload) {
curl_setopt($ch, \CURLOPT_POSTFIELDS, http_build_query($post));
} else {
curl_setopt($ch, \CURLOPT_POSTFIELDS, $post);
}
}
> /Espo/Modules/Advanced/Core/Workflow/Actions/SendRequest.php
if (!$isGet) {
if ($isNotJsonPayload) {
curl_setopt($ch, \CURLOPT_POSTFIELDS, http_build_query($post));
} else {
curl_setopt($ch, \CURLOPT_POSTFIELDS, $post);
}
}
Comment