Show / Hide Table of Contents

Class WMHTTPConnection

Handles the behavior for maintaining connections with external APIs.

Inheritance
object
WMAssetBase
WMHTTPConnection
Implements
IWMAsset
IDbEntity
IWMEntity
IDocumentedEntity
INamedEntity
IWMAssetDirectoryMember
IWMPrincipalOwned
IWMVersionableAsset
IWMOwnableResource
IWMResource
Inherited Members
WMAssetBase.ID
WMAssetBase.CreatedBy
WMAssetBase.CreatedDate
WMAssetBase.LastUpdatedBy
WMAssetBase.LastUpdatedDate
WMAssetBase.Name
WMAssetBase.Documentation
WMAssetBase.DocumentationMIMEType
WMAssetBase.Summary
WMAssetBase.ParentDirectory
WMAssetBase.FullPathName
WMAssetBase.Properties
WMAssetBase.Version
WMAssetBase.VersionName
WMAssetBase.Status
WMAssetBase.IsDeleted
WMAssetBase.Owner
WMAssetBase.OwnerID
WMAssetBase.OwnerType
WMAssetBase.CreateFullPathName(WMAssetDirectory, string)
WMAssetBase.GetFullPath(WMPrincipal, WMAssetIdentifier, string, WMAppDbContext)
WMAssetBase.GetIdentifier(bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.Model.HTTP
Assembly: WMServer.dll
Syntax
[HasDTO(typeof(WMHTTPConnectionDTO))]
public class WMHTTPConnection : WMAssetBase, IWMAsset, IDbEntity, IWMEntity, IDocumentedEntity, INamedEntity, IWMAssetDirectoryMember, IWMPrincipalOwned, IWMVersionableAsset, IWMOwnableResource, IWMResource

Constructors

WMHTTPConnection()

Default constructor

Declaration
public WMHTTPConnection()

WMHTTPConnection(string)

Constructor that initializes the ID

Declaration
public WMHTTPConnection(string id)
Parameters
Type Name Description
string id

Properties

Authentication

The authentication scheme used by this connection.

Declaration
public IHTTPAuthenticationType Authentication { get; set; }
Property Value
Type Description
IHTTPAuthenticationType

AuthenticationData

The authentication token, username/password, header name, etc... for this resource. Is AES-256 encrypted on the database. Is specific to the given AuthenticationType.

Declaration
public Dictionary<string, string> AuthenticationData { get; set; }
Property Value
Type Description
Dictionary<string, string>

AuthenticationType

How this connection is expected to be authenticated.

Declaration
public WMHTTPConnection.AuthType AuthenticationType { get; set; }
Property Value
Type Description
WMHTTPConnection.AuthType

Endpoint

The base URL to form the connection with. Any trailing / will be trimmed. Any WMHTTPRequest using this connection can optionally specify additional routes on top of this base URL.

Declaration
public string Endpoint { get; set; }
Property Value
Type Description
string

Headers

Required headers and values for this resource. Can be overwritten by any WMHTTPRequest using this connection.

Declaration
public Dictionary<string, string> Headers { get; set; }
Property Value
Type Description
Dictionary<string, string>

Methods

BuildAndSendRequest(WMHTTPRequestDTO, HTTPRequestArgs)

Builds an HttpRequestMessage, calls it, and returns the resulting data. Authenticates, and attempts to re-authenticate once on a 401.

Declaration
public Task<HTTPRequestResponse> BuildAndSendRequest(WMHTTPRequestDTO requestParam, HTTPRequestArgs requestArgs)
Parameters
Type Name Description
WMHTTPRequestDTO requestParam

The HTTPRequest asset calling this request.

HTTPRequestArgs requestArgs

The arguments of this request

Returns
Type Description
Task<HTTPRequestResponse>

ResourceDefinition()

The resource operation definition for this asset.

Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type Description
WMResourceOperationsDefinition

Implements

IWMAsset
IDbEntity
IWMEntity
IDocumentedEntity
INamedEntity
IWMAssetDirectoryMember
IWMPrincipalOwned
IWMVersionableAsset
IWMOwnableResource
IWMResource
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE