From 4ac6cd8a7f526d3e7feac83283df82be0da58ce2 Mon Sep 17 00:00:00 2001 From: Cameron Cowen Date: Thu, 29 Apr 2021 20:58:19 +0100 Subject: [PATCH] Minor tweaks to example --- src/samples/aspnet/Elsa.Samples.SendHttp/SendHttpWorkflow.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/samples/aspnet/Elsa.Samples.SendHttp/SendHttpWorkflow.cs b/src/samples/aspnet/Elsa.Samples.SendHttp/SendHttpWorkflow.cs index 89cdf278f..bef11ffe8 100644 --- a/src/samples/aspnet/Elsa.Samples.SendHttp/SendHttpWorkflow.cs +++ b/src/samples/aspnet/Elsa.Samples.SendHttp/SendHttpWorkflow.cs @@ -1,4 +1,5 @@ using Elsa.Activities.Http; +using Elsa.Activities.Http.Models; using Elsa.Builders; using System; using System.Collections.Generic; @@ -19,8 +20,9 @@ namespace Elsa.Samples.SendHttp .SendHttpRequest(setup => setup.WithUrl(new Uri("https://jsonplaceholder.typicode.com/todos/3")) .WithMethod("GET") .WithReadContent(true)) + .WithName("TestHttpRequest") .WriteHttpResponse(setup => setup.WithStatusCode(System.Net.HttpStatusCode.OK) - .WithContent("Hello World")); + .WithContent(x => System.Text.Json.JsonSerializer.Serialize(x.GetOutputFrom("TestHttpRequest").Content))); } } }