Class HttpExtensions
Helper extensions for HttpService and IOC container
Inheritance
System.Object
HttpExtensions
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: Onbox.Core.V8.Http
Assembly: Onbox.Core.dll
Syntax
public static class HttpExtensions
Methods
| Improve this Doc View SourceAddHttp(IContainer)
Adds IHttpService as HttpService to the container
Declaration
public static IContainer AddHttp(this IContainer container)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container |
Returns
Type | Description |
---|---|
IContainer |
AddHttp(IContainer, IHttpInterceptor, Action<HttpSettings>)
Adds IHttpService as HttpService to the container with interception and configuration
Declaration
public static IContainer AddHttp(this IContainer container, IHttpInterceptor httpInterceptor, Action<HttpSettings> config = null)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
IHttpInterceptor | httpInterceptor | |
System.Action<HttpSettings> | config |
Returns
Type | Description |
---|---|
IContainer |
AddHttp(IContainer, Action<HttpSettings>)
Adds IHttpService as HttpService to the container with configuration
Declaration
public static IContainer AddHttp(this IContainer container, Action<HttpSettings> config = null)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<HttpSettings> | config |
Returns
Type | Description |
---|---|
IContainer |
AddHttp(IContainer, Action<HttpSettings>, Action<HttpRequestMessage>, Action<HttpResponseMessage>)
Adds IHttpService as HttpService to the container with interception
Declaration
public static IContainer AddHttp(this IContainer container, Action<HttpSettings> config = null, Action<HttpRequestMessage> beforeSendingAction = null, Action<HttpResponseMessage> afterSendingAction = null)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<HttpSettings> | config | |
System.Action<System.Net.Http.HttpRequestMessage> | beforeSendingAction | |
System.Action<System.Net.Http.HttpResponseMessage> | afterSendingAction |
Returns
Type | Description |
---|---|
IContainer |
AddHttp<TInterceptor>(IContainer, Action<HttpSettings>)
Adds IHttpService as HttpService to the container with interception and configuration
Declaration
public static IContainer AddHttp<TInterceptor>(this IContainer container, Action<HttpSettings> config = null)
where TInterceptor : IHttpInterceptor, new()
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<HttpSettings> | config |
Returns
Type | Description |
---|---|
IContainer |
Type Parameters
Name | Description |
---|---|
TInterceptor |
ConfigureHttp(IContainer, Action<HttpSettings>)
Adds IHttpService as HttpService to the container with configuration
Declaration
public static IContainer ConfigureHttp(this IContainer container, Action<HttpSettings> config)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<HttpSettings> | config |
Returns
Type | Description |
---|---|
IContainer |