elsa-core/src/modules/Elsa.Http/Options/HttpActivityOptions.cs
Sipke Schoorstra a9eb326c5e
Update bulk delete endpoints and request model
Refactor the bulk delete endpoint to include a new primary route while deprecating the old one. Expand the request model to support workflow definition filters and adjust response instantiation for clarity. Update obsolete API route prefix guidance for consistency across modules.
2025-03-07 10:04:41 +01:00

46 lines
1.6 KiB
C#

using Microsoft.AspNetCore.Http;
namespace Elsa.Http.Options;
/// <summary>
/// Provides various options related to the HTTP activities.
/// </summary>
public class HttpActivityOptions
{
/// <summary>
/// The root path at which HTTP activities can be invoked.
/// </summary>
public PathString? BasePath { get; set; } = "/workflows";
/// <summary>
/// The base URL of the server. This should be set to the same value at which the Elsa Server is publicly available. It will be used when generating absolute URLs need to be generated by activities such as SendEmail.
/// </summary>
public Uri BaseUrl { get; set; } = default!;
/// <summary>
/// The prefix used for API routes.
/// </summary>
[Obsolete("Use ApiEndpointOptions from Elsa.Workflows.Api instead.")]
public string ApiRoutePrefix { get; set; } = "elsa/api";
/// <summary>
/// A configurable set of available content types available from the <see cref="WriteHttpResponse"/> activity.
/// </summary>
public ISet<string> AvailableContentTypes { get; set; } = new SortedSet<string>
{
"application/json",
"application/xml",
"application/x-www-form-urlencoded",
"application/octet-stream",
"text/plain",
"text/html",
"text/json",
"text/xml",
};
/// <summary>
/// A boolean to opt-in if you want to call CompleteAsync() in the HttpResponse Activity
/// and not waiting for the end of the HttpMiddleware.
/// </summary>
public Boolean WriteHttpResponseSynchronously { get; set; } = false;
}