I tried making a get call via the bpmn model, and it was successful. Now, I want to make a post call instead. I set the following input parameters:
URL, headers, method, payload.
I want to know how to send the parameters of a post call, and also on how to read the response.
What format does “payload” have to be in, “text” or “javascript”? Do I send it as JSON?
What are the output parameters to be used? What would the script in the output parameter be?
Hey,
I am using Camunda Modeler.
I want to know how to send the parameters of a post call, and also on how to read the response!
basically, the contents of “payload” and “bodyresponse”.
Hey, thanks. I had already read the blog post before posting my query here. The blog post talks about retrieving variables from the database. But, in my case, I don’t have any database so I want to send the payload data from the bpmn itself.
Hence, want to know what goes into “payload”.
Thanks for the reply.
Basically, I want to make a post call via a service task. I want to send the contents of a process variable as the payload of the post call.
Then the format of the payload depends on what your server expects. If it’s JSON, set the correct header (Content-Type: application/json) and use JSON for the payload. You can access the process variables in a script as shown in the blog post, so a script might be the preferable type of the input payload property.
Thanks for the prompt reply.
The server expects “application/x-www-form-urlencoded” content, so have set it respectively.
As shown in the screenshot, I want to send these four fields as the payload of the post call. How do I do it?
The first post call{access token service task} returns a value(a bearer token) which is stored in a process variable. Now, I want to send the same value as “authorization” in the next post call{app create service task} made. How to I set it in the service task headers?