Class HttpInvokeComponent
Implements a message pipeline component that makes an HTTP call on the specified address and stores the response into the specified context properties.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Processing
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class HttpInvokeComponent : MessagePipelineComponentBase, IValidator, IEquatable<MessagePipelineComponentBase>, IExtensibleDataObject
Constructors
HttpInvokeComponent()
Declaration
public HttpInvokeComponent()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "HTTP-INVOKE"
Field Value
Type | Description |
---|---|
String |
Properties
RequestBody
Gets or sets the HTTP request message body content. The value may contain the context property tokens.
Declaration
public string RequestBody { get; set; }
Property Value
Type | Description |
---|---|
String |
RequestHeaders
Gets the collection of HTTP headers that must be added to HTTP request message.
Declaration
public Collection<HttpInvokeRequestHeader> RequestHeaders { get; }
Property Value
Type | Description |
---|---|
Collection<HttpInvokeRequestHeader> |
RequestMethod
Gets or sets the request HTTP method (verb). The value may contain the context property tokens and must resolve to a valid HTTP method (GET, PUT, POST, etc.).
Declaration
public string RequestMethod { get; set; }
Property Value
Type | Description |
---|---|
String |
RequestUri
Gets or sets the request URI. The value may contain the context property tokens and must resolve to a valid absolute URI.
Declaration
public string RequestUri { get; set; }
Property Value
Type | Description |
---|---|
String |
ResponseBodyPropertyName
Gets or sets the context property name that will be used to store the HTTP response body content. If not specified then response body content will not be captured.
Declaration
public string ResponseBodyPropertyName { get; set; }
Property Value
Type | Description |
---|---|
String |
ResponseHeaderPropertyNames
Gets the collection of HTTP response headers that must be stored to context properties.
Declaration
public Collection<HttpInvokeResponseHeader> ResponseHeaderPropertyNames { get; }
Property Value
Type | Description |
---|---|
Collection<HttpInvokeResponseHeader> |
ResponseStatusCodePropertyName
Gets or sets the context property name that will be used to store the HTTP response status code. If not specified then response status code will not be captured.
Declaration
public string ResponseStatusCodePropertyName { get; set; }
Property Value
Type | Description |
---|---|
String |
Timeout
Gets or sets the timespan (in seconds) to wait before the request times out. If property value is not set or set to zero then timeout is set to 30 seconds.
Declaration
public int Timeout { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Equals(MessagePipelineComponentBase)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(MessagePipelineComponentBase other)
Parameters
Type | Name | Description |
---|---|---|
MessagePipelineComponentBase | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Returns hash code for the value of this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code for the value of this instance. |
Overrides
ProcessMessage(MessagePipelineContext)
Transforms the message content using Liquid Template Language.
Declaration
public override MessagePipelineResult ProcessMessage(MessagePipelineContext context)
Parameters
Type | Name | Description |
---|---|---|
MessagePipelineContext | context | Provides the message processing context. |
Returns
Type | Description |
---|---|
MessagePipelineResult | Value indicating if message should continue on its way to the recipient or must be stopped and returned to the sender. |
Overrides
ToString()
Returns string representation of the object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | String representing the object's content. |
Overrides
Validate()
Evaluates the state of the object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |