I am trying to connect to an outside API using the HTTP-connector. I need to call different procedures, using different content-types (application/json, multipart/form-date). I want to build the process variable ‘content’ within a template and feed it to the http-connector. This fails.
When I select the content from a table-field with datatype nvarchar(4000) and multiline control it works fine. I can select the content from the column and feed it to the http connector. It also works when I use a taskparameter to paste the content into the process variable.
So far I figured out that it has something to do with the CR / linefeed. But when I simply remove all CR's, this still won't work. Since I need to compose the content from some static text and a few variables (pdf-data for example) I do need the template.
Example of what I am trying to build (which works fine when using the task-parameter):
Content-Disposition: form-data; name="payload"
Content-Disposition: form-data; name="file"
Does anybody know how to build this content within a template?
Best answer by Hugo NienhuisView original