< 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: 15
Uncovered lines: 0
Coverable lines: 15
Total lines: 46
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%

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>
 36013    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>
 1518    public Uri BaseUrl { get; set; } = null!;
 19
 20    /// <summary>
 21    /// The prefix used for API routes.
 22    /// </summary>
 23    [Obsolete("Use ApiEndpointOptions from Elsa.Workflows.Api instead.")]
 4824    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>
 4929    public ISet<string> AvailableContentTypes { get; set; } = new SortedSet<string>
 4730    {
 4731        "application/json",
 4732        "application/xml",
 4733        "application/x-www-form-urlencoded",
 4734        "application/octet-stream",
 4735        "text/plain",
 4736        "text/html",
 4737        "text/json",
 4738        "text/xml",
 4739    };
 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>
 6345    public Boolean WriteHttpResponseSynchronously { get; set; } = false;
 46}