โ04-11-2024 03:34 AM
Team,
I am trying to use http connector in workato, and looking for sample request with POST and body in it. Please share the sample if you have any.
Regards,
Inderjeet
Solved! Go to Solution.
โ04-12-2024 10:07 AM - edited โ04-12-2024 10:08 AM
You can construct the POST body however you need to, so long as it's a valid JSON.
If you want to parse the response of the request, this is also possible.
Here's what I usually do to set it up:
1. Set up the request above and test the recipe.
2. Go to the test job and look at the output of the request. Click "Copy Raw JSON"
3. Go back to the HTTP action in the recipe editor, and in Response > Response Schema, click "Use JSON"
4. In the JSON editor, paste the raw JSON you copied in step 2.
5. Delete everything except the "response" object (keep what is highlighted below)
Like this:
6. Click Next and then Generate, and this will create a schema of output data pills based on the JSON
7. You can now access the data pills in subsequent steps in the recipe
โ04-11-2024 09:44 AM
Here you go:
โ04-11-2024 11:23 PM
Thanks for your reply. Is it possible to parse the json in the body?
โ04-12-2024 10:07 AM - edited โ04-12-2024 10:08 AM
You can construct the POST body however you need to, so long as it's a valid JSON.
If you want to parse the response of the request, this is also possible.
Here's what I usually do to set it up:
1. Set up the request above and test the recipe.
2. Go to the test job and look at the output of the request. Click "Copy Raw JSON"
3. Go back to the HTTP action in the recipe editor, and in Response > Response Schema, click "Use JSON"
4. In the JSON editor, paste the raw JSON you copied in step 2.
5. Delete everything except the "response" object (keep what is highlighted below)
Like this:
6. Click Next and then Generate, and this will create a schema of output data pills based on the JSON
7. You can now access the data pills in subsequent steps in the recipe