Class ActionRequestBuilder
- Namespace
- FunctionCalling
- Assembly
- AntRunnerLib.dll
Represents an action request to make HTTP calls.
public class ActionRequestBuilder
- Inheritance
-
System.ObjectActionRequestBuilder
- 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
baseUrlSystem.StringThe baseUrl of the request.
pathSystem.StringThe path of the request.
methodSystem.StringThe HTTP method used in the request.
operationSystem.StringThe operation name of the request.
isConsequentialSystem.BooleanIndicates whether the request is consequential.
contentTypeSystem.StringThe content type of the request.
authHeadersDictionary<System.String, System.String>The authentication headers for the request.
oAuthSystem.BooleanIndicates whether the request uses OAuth for authentication.
Properties
ActionType
Gets the type of action to perform.
public ActionType ActionType { get; }
Property Value
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
oAuthUserAccessTokenSystem.StringOptional OAuth user access token for authentication.
Returns
- Task<HttpResponseMessage>