Class HeaderManagementExtensions
public static class HeaderManagementExtensions
- Inheritance
-
HeaderManagementExtensions
- Inherited Members
Methods
AddRequestHeader(IConfigureActionBuilder, string, string)
Adds a request header to the IConfigureActionBuilder instance.
public static IConfigureFilterBuilder AddRequestHeader(this IConfigureActionBuilder actionBuilder, string headerName, string headerValue)
Parameters
actionBuilderIConfigureActionBuilderThe configure action builder to add the request header to.
headerNamestringThe name of the header to add.
headerValuestringThe value of the header to add.
Returns
- IConfigureFilterBuilder
A new instance of IConfigureFilterBuilder which allows further configuration.
AddResponseHeader(IConfigureActionBuilder, string, string)
Adds a response header with the specified name and value to the action builder.
public static IConfigureFilterBuilder AddResponseHeader(this IConfigureActionBuilder actionBuilder, string headerName, string headerValue)
Parameters
actionBuilderIConfigureActionBuilderThe action builder to add the response header to.
headerNamestringThe name of the response header.
headerValuestringThe value of the response header.
Returns
- IConfigureFilterBuilder
The action builder with the added response header.
DeleteRequestHeader(IConfigureActionBuilder, string)
Deletes a request header from the action builder.
public static IConfigureFilterBuilder DeleteRequestHeader(this IConfigureActionBuilder actionBuilder, string headerName)
Parameters
actionBuilderIConfigureActionBuilderThe action builder.
headerNamestringThe name of the header to delete.
Returns
- IConfigureFilterBuilder
The updated configure filter builder.
DeleteResponseHeader(IConfigureActionBuilder, string)
Deletes the specified response header from the action builder.
public static IConfigureFilterBuilder DeleteResponseHeader(this IConfigureActionBuilder actionBuilder, string headerName)
Parameters
actionBuilderIConfigureActionBuilderThe action builder.
headerNamestringThe name of the header to delete.
Returns
- IConfigureFilterBuilder
An instance of IConfigureFilterBuilder for further configuration.
UpdateRequestHeader(IConfigureActionBuilder, string, string)
Replaces the value of a request header with a new value.
public static IConfigureFilterBuilder UpdateRequestHeader(this IConfigureActionBuilder actionBuilder, string headerName, string headerValue)
Parameters
actionBuilderIConfigureActionBuilderThe action builder.
headerNamestringThe name of the header to replace.
headerValuestringThe new value for the header.
Returns
- IConfigureFilterBuilder
A new instance of the IConfigureFilterBuilder interface.
UpdateResponseHeader(IConfigureActionBuilder, string, string)
Replaces the value of a specified response header with a new value.
public static IConfigureFilterBuilder UpdateResponseHeader(this IConfigureActionBuilder actionBuilder, string headerName, string headerValue)
Parameters
actionBuilderIConfigureActionBuilderThe IConfigureActionBuilder used to configure the action.
headerNamestringThe name of the header to replace.
headerValuestringThe new value to set for the header.
Returns
- IConfigureFilterBuilder
A new IConfigureFilterBuilder with the updated response header.