< Summary

Information
Class: Elsa.Http.Options.HttpActivityOptions
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Options/HttpActivityOptions.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 52
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_BasePath()100%11100%
get_BaseUrl()100%11100%
get_ApiRoutePrefix()100%11100%
get_AvailableContentTypes()100%11100%
.ctor()100%11100%
get_WriteHttpResponseSynchronously()100%11100%
get_RateLimitingPolicyName()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Options/HttpActivityOptions.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Http;
 2
 3namespace Elsa.Http.Options;
 4
 5/// <summary>
 6/// Provides various options related to the HTTP activities.
 7/// </summary>
 8public class HttpActivityOptions
 9{
 10    /// <summary>
 11    /// The root path at which HTTP activities can be invoked.
 12    /// </summary>
 92913    public PathString? BasePath { get; set; } = "/workflows";
 14
 15    /// <summary>
 16    /// The base URL of the server. This should be set to the same value at which the Elsa Server is publicly available.
 17    /// </summary>
 10218    public Uri BaseUrl { get; set; } = new Uri("https://localhost:5001");
 19
 20    /// <summary>
 21    /// The prefix used for API routes.
 22    /// </summary>
 23    [Obsolete("Use ApiEndpointOptions from Elsa.Workflows.Api instead.")]
 5424    public string ApiRoutePrefix { get; set; } = "elsa/api";
 25
 26    /// <summary>
 27    /// A configurable set of available content types available from the <see cref="WriteHttpResponse"/> activity.
 28    /// </summary>
 5729    public ISet<string> AvailableContentTypes { get; set; } = new SortedSet<string>
 5130    {
 5131        "application/json",
 5132        "application/xml",
 5133        "application/x-www-form-urlencoded",
 5134        "application/octet-stream",
 5135        "text/plain",
 5136        "text/html",
 5137        "text/json",
 5138        "text/xml",
 5139    };
 40
 41    /// <summary>
 42    /// A boolean to opt-in if you want to call CompleteAsync() in the HttpResponse Activity
 43    /// and not waiting for the end of the HttpMiddleware.
 44    /// </summary>
 11145    public bool WriteHttpResponseSynchronously { get; set; } = false;
 46
 47    /// <summary>
 48    /// The ASP.NET Core rate limiting policy to apply to inbound HTTP workflow trigger routes.
 49    /// <c>null</c> means unspecified and allows a host to assign a default policy; an empty string disables HTTP workfl
 50    /// </summary>
 1251    public string? RateLimitingPolicyName { get; set; }
 52}