In some cases, the Harness HTTP step fails to perform what Harness uses expect of it. When this happens, you can replace it with a simple shell script and the curl command.
Harness uses the output from the last shell script command to determine the entire shell script step success or failure. This means that if curl is the only command in the scrip, and it fails, the entire shell script step will fail.
- Curl may allow parameters not available in Harness HTTP command
- Output from curl command is more verbose
- Curl in shell use the delegate proxy settings. This is currently not supported by Harness HTTP command
Add a shell script step to your workflow. The context of the step should be the curl command to the URL being tested:
Upon execution, if the curl command report success connecting the target, the step will be considered a success:
If the curl command fails (due to network issues, resources not up, etc.) the command will be considered to have failed and the workflow will be stopped: