I am new to the Workflow Rest API. all seems to be working weel when i write the code in powershell and execute.
but then i put the same code on Workflow command it gives me the below error:
"The underlying connection was closed: An unexpected error occurred on a send."
I am plaving the below lines in the code to work with SSL/TLS, and as i mentioned it works well with simple Powershell Script, but not though Workflow engine. specially when using HTTPS connection. Http connection is no problems.
Are you providing credentials in the header of the REST call via PowerShell? If not, you'll need to add that. One way to do that is with a base64 encoded encoded Basic Authorization header like this example.