Skip to main content

AddHeaderAttribute

Assembly: ServiceStack.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
public class AddHeaderAttribute : RequestFilterAttribute, _Attribute, IHasRequestFilter, IRequestFilterBase

Properties

Name

View Source
Declaration
public string Name { get; set; }

Value

View Source
Declaration
public string Value { get; set; }

Status

View Source
Declaration
public HttpStatusCode Status { get; set; }

StatusCode

View Source
Declaration
public int? StatusCode { get; set; }

StatusDescription

View Source
Declaration
public string StatusDescription { get; set; }

ContentType

View Source
Declaration
public string ContentType { get; set; }

DefaultContentType

View Source
Declaration
public string DefaultContentType { get; set; }

ContentEncoding

View Source
Declaration
public string ContentEncoding { get; set; }

ContentLength

View Source
Declaration
public string ContentLength { get; set; }

ContentDisposition

View Source
Declaration
public string ContentDisposition { get; set; }

Location

View Source
Declaration
public string Location { get; set; }

SetCookie

View Source
Declaration
public string SetCookie { get; set; }

ETag

View Source
Declaration
public string ETag { get; set; }

CacheControl

View Source
Declaration
public string CacheControl { get; set; }

LastModified

View Source
Declaration
public string LastModified { get; set; }

Inherited Properties

ApplyTo

View Source
Declaration
public ApplyTo ApplyTo { get; set; }

Priority

View Source
Declaration
public int Priority { get; set; }

Methods

Execute(IRequest, IResponse, Object)

View Source
Declaration
public override void Execute(IRequest req, IResponse res, object requestDto)
Parameters
TypeName
ServiceStack.Web.IRequestreq
ServiceStack.Web.IResponseres
System.ObjectrequestDto

Inherited Methods

Copy()

Create a ShallowCopy of this instance.

View Source
Declaration
public virtual IRequestFilterBase Copy()
Returns

ServiceStack.Web.IRequestFilterBase

Execute(IRequest, IResponse, Object)

This method is only executed if the HTTP method matches the ServiceStack.RequestFilterAttribute.ApplyTo property.

View Source
Declaration
public abstract void Execute(IRequest req, IResponse res, object requestDto)
Parameters
TypeNameDescription
ServiceStack.Web.IRequestreqThe http request wrapper

| | ServiceStack.Web.IResponse | res | The http response wrapper

| | System.Object | requestDto | The request DTO

|

RequestFilter(IRequest, IResponse, Object)

View Source
Declaration
public void RequestFilter(IRequest req, IResponse res, object requestDto)
Parameters
TypeName
ServiceStack.Web.IRequestreq
ServiceStack.Web.IResponseres
System.ObjectrequestDto

Implements