Creating an api to start a system flow

  • 5 December 2022
  • 4 replies

Hi, I have used the following guide to create an api call to my Systemflow in Insomnia.

This works like a charm, the system flow is working and callable. I am now trying to setup another process-flow that uses a task to start an API call to the system flow, but I am getting the following error: The remote server returned an error: (411) Length Required. I have to admit my knowledge of API's is very limited, I tried to setup the http connector with the same settings as I used in Insomnia. As input for the http_connector i have the following input: https://[server]/indicium/iam/clevrr_test/test_api_system_flow (same URL as the working one in insomnia). Http method is set to: POST. I have tried to use authentication username + password as well, but that does not work. Do I need to send empty content? Is there something Insomnia does, that is not done automatically by the http_connector? What am i missing? Tnx in advance.



Best answer by Vincent Doppenberg 5 December 2022, 18:00

View original

This topic has been closed for comments

4 replies

Userlevel 6
Badge +4

Hello Guido,

Could you try using the following Constant value for the Headers parameter:

[ { "Key": "Content-Length", "Value": "0" } ]

Insomnia will indeed add this header by default.

I hope this helps.

Thank you, that was indeed what was missing.

Userlevel 2
Badge +3

@Vincent Doppenberg is there a reason that the content-length is not (automagically) provided by the api system? From what I understand rfc9110 (8.6) says something about POST and always needing a content-length.

Userlevel 6
Badge +4

Hello Ricky,

There is no real reason for this. I agree that the HTTP Connector should follow the RFC and automatically supply such headers when they are not supplied by the developer. This applies to Indicium as well as the Windows and Web GUIs.

We will look into adding this to future versions of the mentioned products.