Unable to set custom response filter attribute

I get the request filter attribute to run, but the response filter never does. What am I missing?

[MyResponse] [MyRequest] public class MyService : Service { public object Get(RequestDto request) { return new {foo = "bar"}; } } public class MyResponseAttribute : ResponseFilterAttribute { public override void Execute(IHttpRequest req, IHttpResponse res, object requestDto) { var x = requestDto; } } public class MyRequestAttribute : RequestFilterAttribute { public override void Execute(IHttpRequest req, IHttpResponse res, object responseDto) { var x = responseDto; } } 
+4
source share
1 answer

I cannot reproduce this behavior using the test I just added here .

If you still think this is a skeleton issue, can you send the failed unit test to the project (the transfer request is preferred).

0
source

Source: https://habr.com/ru/post/1437764/


All Articles