Class HttpClientFactory
The default implementation of the HTTP client factory.
Inheritance
System.Object
HttpClientFactory
Implements
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()
Namespace: Google.Apis.Http
Assembly: Google.Apis.Core.dll
Syntax
public class HttpClientFactory : IHttpClientFactory
Methods
CreateClientHandler()
Create a System.
Declaration
protected virtual HttpClientHandler CreateClientHandler()
Returns
Type | Description |
---|---|
System. |
A suitable System. |
Remarks
When overriding this method, please observe the following:
-
System.
Net. and System.Http. Http Client Handler. Allow Auto Redirect Net. of the returned instance are configured after this method returns. Configuring these within this method will have no effect.Http. Http Client Handler. Automatic Decompression -
Return a new instance of an System.
Net. for each call to this method.Http. Http Client Handler - This method may be called once, or more than once, when initializing a single client service.
CreateHandler(CreateHttpClientArgs)
Creates a HTTP message handler. Override this method to mock a message handler.
Declaration
protected virtual HttpMessageHandler CreateHandler(CreateHttpClientArgs args)
Parameters
Type | Name | Description |
---|---|---|
Create |
args |
Returns
Type | Description |
---|---|
System. |
CreateHttpClient(CreateHttpClientArgs)
Creates a new configurable HTTP client.
Declaration
public ConfigurableHttpClient CreateHttpClient(CreateHttpClientArgs args)
Parameters
Type | Name | Description |
---|---|---|
Create |
args |
Returns
Type | Description |
---|---|
Configurable |