Content type in BPMN HTTP request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisCross
    Junior Member
    • Jun 2022
    • 20

    #1

    Content type in BPMN HTTP request

    Hello dear Espo community,

    I'm working with BPM flowcharts.
    I'm sending an HTTP request in a task.

    Our partner, who is on the other side of the interface, requires us to send a very specific content type. Of course, I can't select this from the dropdown menu.

    If I set the content type in the header, however, I have to set the content type to "none" in the dropdown menu, which means that no content data is transferred at all.

    My idea was to add this specific content type to the dropdown menu.

    Does anyone know where to do this?

    Thanks for the help.

    Best regards,

    Chris
  • yuri
    Member
    • Mar 2014
    • 9084

    #2
    Hi Chris,

    How the payload is supposed to be transferred for your case?
    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

    • yuri
      Member
      • Mar 2014
      • 9084

      #3
      Setting the Content-Type header in the Headers field while having it empty in the Content-Type field should work. You can form your payload in a formula script as a string value.

      I tested it relatively recently.
      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

      • ChrisCross
        Junior Member
        • Jun 2022
        • 20

        #4
        Hello Juri,

        Thanks for your answer.
        Exactly. If I enter the specific content type in the header and leave the Content-Type field blank, the header is transferred correctly. But then, logically, no payload. However, I need to transfer "customerId" and "productId."

        The data is transferred via the JSON structure.

        How exactly should I transfer the payload in a formula field?

        Comment

        • yuri
          Member
          • Mar 2014
          • 9084

          #5
          I don't know how to answer your question.

          You can craft a payload string in formula in a previous action or a flowchart node. Store it in the variable. Then specify the variable name in the Send HTTP Request action. Assuming you use not an old Advanced Pack version.
          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...