I have a SendHTTPRequest
activity in an Elsa Workflow and it executes correctly, but the response doesn't get displayed even though I selected Read Content
. The page is still empty. Why isn't it showing the result?
There isn't any documentation on SendHTTPRequest
but after looking at the source code and some trial and error, I was able to get the response to show by adding a WriteHTTPResponse
after the SendHTTPRequest
. The SendHTTPRequest
also needed some additional configuration:
Supported Status Codes
section. This creates the different flow paths after execution.Name
(e.g. GetHTTP
) so you can get access to the response in WriteHTTPResponse
.Now drag the status code path to WriteHTTPRequest
so it will execute that activity on a 200. In the Content
section you can then use an expression to output the response.
E.g. GetHTTP.Response.Content
and select JavaScript
from the dropdown.