コード例 #1
0
        protected async override Task <HttpResponseMessage> SendAsync(
            HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var _response = new Models.Response(System.Net.HttpStatusCode.BadRequest, "error!");

            responseController.Send(_response);
            //Debug.WriteLine("Process request");
            // Call the inner handler.
            //var response = await base.SendAsync(request, cancellationToken);
            var response = await responseController.Send(_response).ExecuteAsync(cancellationToken);

            //Debug.WriteLine("Process response");
            return(response);
        }