Class ToHeaderAttribute
response dto properties marked with this attribute will cause an automatic response header to be added to the http response with the value from the property that is annotated.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.Attributes.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class ToHeaderAttribute : Attribute
Constructors
ToHeaderAttribute(string?)
response dto properties marked with this attribute will cause an automatic response header to be added to the http response with the value from the property that is annotated.
Declaration
public ToHeaderAttribute(string? headerName = null)
Parameters
Type | Name | Description |
---|---|---|
string | headerName | a custom name for the header. if not supplied, the property name will be used. |
Properties
HeaderName
a custom name for the header. if not supplied, the property name will be used.
Declaration
public string? HeaderName { get; set; }
Property Value
Type | Description |
---|---|
string |