Table of Contents

Class ActionRequestBuilder

Namespace
FunctionCalling
Assembly
AntRunnerLib.dll

Represents an action request to make HTTP calls.

public class ActionRequestBuilder
Inheritance
System.Object
ActionRequestBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

Constructors

ActionRequestBuilder(String, String, String, String, Boolean, String, Dictionary<String, String>, Boolean)

Initializes a new instance of the ActionRequestBuilder class with specified parameters.

public ActionRequestBuilder(string baseUrl, string path, string method, string operation, bool isConsequential, string contentType, Dictionary<string, string> authHeaders, bool oAuth = false)

Parameters

baseUrl System.String

The baseUrl of the request.

path System.String

The path of the request.

method System.String

The HTTP method used in the request.

operation System.String

The operation name of the request.

isConsequential System.Boolean

Indicates whether the request is consequential.

contentType System.String

The content type of the request.

authHeaders Dictionary<System.String, System.String>

The authentication headers for the request.

oAuth System.Boolean

Indicates whether the request uses OAuth for authentication.

Properties

ActionType

Gets the type of action to perform.

public ActionType ActionType { get; }

Property Value

ActionType

AuthHeaders

Gets the authentication headers for the request.

public Dictionary<string, string> AuthHeaders { get; set; }

Property Value

Dictionary<System.String, System.String>

BaseUrl

Gets or sets the baseUrl of the request.

public string BaseUrl { get; set; }

Property Value

System.String

ContentType

Gets or sets the content type of the request.

public string ContentType { get; set; }

Property Value

System.String

IsConsequential

Gets or sets a value indicating whether the request is consequential.

public bool IsConsequential { get; set; }

Property Value

System.Boolean

Method

Gets or sets the HTTP method used in the request.

public string Method { get; set; }

Property Value

System.String

oAuth

Gets or sets a value indicating whether the request uses OAuth for authentication.

public bool oAuth { get; set; }

Property Value

System.Boolean

Operation

Gets or sets the operation name of the request.

public string Operation { get; set; }

Property Value

System.String

Params

Gets or sets the additional parameters for the request.

public Dictionary<string, object>? Params { get; set; }

Property Value

System.Nullable<Dictionary<System.String, System.Object>>

Path

Gets or sets the path of the request.

public string Path { get; set; }

Property Value

System.String

Methods

ExecuteLocalFunctionAsync()

Executes the local function asynchronously.

public async Task<object> ExecuteLocalFunctionAsync()

Returns

Task<System.Object>

The result of the local function execution.

ExecuteWebApiAsync(String)

Executes the action request asynchronously.

public async Task<HttpResponseMessage> ExecuteWebApiAsync(string oAuthUserAccessToken = null)

Parameters

oAuthUserAccessToken System.String

Optional OAuth user access token for authentication.

Returns

Task<HttpResponseMessage>