예제 #1
0
        public virtual void AfterReceiveReply(ref Message reply, object correlationState)
        {
            HttpResponseMessageProperty prop = (HttpResponseMessageProperty)reply.Properties[HttpResponseMessageProperty.Name];
            string body = General.ReadMessageBody(ref reply);

            logger(General.GetHttpResponseLog(prop.StatusCode.ToString(), prop.Headers, body));
        }
예제 #2
0
        public virtual object BeforeSendRequest(ref Message request, IClientChannel channel)
        {
            HttpRequestMessageProperty prop = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name];
            string body = General.ReadMessageBody(ref request);
            logger(General.GetHttpRequestLog(prop.Method, request.Headers.To.AbsoluteUri, prop.Headers, body));

            return request;
        }