Class DelegatingHttpClientFactory

The DelegatingHttpClientFactory class constructs instances of HttpClient capable of communicating with an identified service.

Inheritance
System.Object
DelegatingHttpClientFactory
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Common.Rest
Assembly: EPiServer.Social.Common.Rest.dll
Version: 1.5.4
Syntax
public class DelegatingHttpClientFactory : IHttpClientFactory

Constructors

DelegatingHttpClientFactory(String, Int32, DelegatingHandler[])

Constructor

Declaration
public DelegatingHttpClientFactory(string serviceBaseAddress, int requestTimeout, params DelegatingHandler[] delegatingHandlers)
Parameters
Type Name Description
System.String serviceBaseAddress

Base address for target service

System.Int32 requestTimeout

Milliseconds to wait before request times out

System.Net.Http.DelegatingHandler[] delegatingHandlers

Message handlers to apply to request pipeline

Properties

RequestTimeout

Gets or sets the number of milliseconds to wait before the request times out.

Declaration
protected int RequestTimeout { get; }
Property Value
Type Description
System.Int32

ServiceBaseAddress

Gets the base address for the service to be targeted by clients constructed with this service.

Declaration
protected string ServiceBaseAddress { get; }
Property Value
Type Description
System.String

Methods

Create()

Creates an instance of HttpClient targeting the service address identified for this factory.

Declaration
public virtual HttpClient Create()
Returns
Type Description
System.Net.Http.HttpClient

New instance of HttpClient

Implements

arrow_upward