using System.Net;
using Elsa.Extensions;
using Elsa.Http.ContentWriters;
using Elsa.Http.Models;
using Elsa.Http.Providers;
using Elsa.Workflows.Core;
using Elsa.Workflows.Core.Attributes;
using Elsa.Workflows.Core.Models;
using Microsoft.AspNetCore.Http;
namespace Elsa.Http;
///
/// Write a response to the current HTTP response object.
///
[Activity("Elsa", "HTTP", "Write a response to the current HTTP response object.", DisplayName = "HTTP Response")]
public class WriteHttpResponse : CodeActivity
{
///
/// The status code to return.
///
[Input(DefaultValue = HttpStatusCode.OK, Description = "The status code to return.")]
public Input StatusCode { get; set; } = new(HttpStatusCode.OK);
///
/// The content to write back.
///
[Input(Description = "The content to write back. String values will be sent as-is, while objects will be serialized to a JSON string. Byte arrays and streams will be sent as files.")]
public Input