我在 ServiceStack里实现了 Logging 中的请求与返回,同时我想在IRequestLogger.Log() 方法中获取 IHttpRequest .
IRequestContext 并不包含像IHttpRequest的信息,我们可以间接通过强制转换得到
void Log(IRequest request, object requestDto, object response, TimeSpan elapsed)
{
var httpReq = request as IHttpRequest;
var aspReq = request.OriginalRequest as HttpRequestBase;
}