我正在查看,AppHostBase.cs
它具有以下内容:
//....
public IContentTypeFilter ContentTypeFilters {
get {return EndpointHost.ContentTypeFilter;}
}
public List<Action<IHttpRequest, IHttpResponse>> PreRequestFilters {
get {return EndpointHost.RawRequestFilters;}
}
public List<Action<IHttpRequest, IHttpResponse, object>> RequestFilters {
get {return EndpointHost.RequestFilters;}
}
public List<Action<IHttpRequest, IHttpResponse, object>> ResponseFilters {
get {return EndpointHost.ResponseFilters;}
}
//....
我从 SS 网站文档中阅读并知道什么是RequestFilters
and ResponseFilters
。但为什么会有一个PreRequestFilter
分开的RequestFilters
?它是干什么用的?
我google了一下,看到一个SignalR代码的例子写在PreRequestFilters
为什么不直接写有RequestFilters
什么区别?