You can use couple of options for this purpose.
1. You can use operation handlers called ResponseHandlers which get executed after the service operation returns. On the WebApiConfiguration object, there should be a property called ResponseHandlers to do the hook up.
2. You can access the outbound response even in MessageHandler pipeline. For this you need to hookup message handlers using the configuration object. You can do this via
MessageHandlers property or if you want to provide a factory, you can do so using the
MessageHandlerFactory property on it.
Btw, currently i would suggest you to use Option 1. as we seem to have a bug in getting the content returned by a service operation using Option 2. However, this bug as been fixed in our soure code and will be part
of our next update.
if you are new to these concepts, you can go through this great blog:
Thanks, Kiran Challa