HTTP Request not URL encoding form data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ecg
    Junior Member
    • Jan 2023
    • 2

    HTTP Request not URL encoding form data

    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);
    }
    }​
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    You might using not up to date version of Advanced Pack. This functionality was rewritten.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...