spray/spray — pull request #588 by ivantopo (2013-10-11 19:15:35+00:00)
Title: = can: group commander dispatchs for easier instrumentation

The two places dispatching messages to the commander actor are now delegating to a dedicated method, similar to what the `dispatchToServer` method is doing.. this opens the door for anyone who wants to instrument spray-client calls by providing a clear place to hook on any response sent back to the commander.

We explored the idea of instrumenting the `HttpClientConnection` as suggested by Mathias but having a hook at the `HttpHostConnectionSlot` level makes it way easier to deal with retries, as well as providing a unified view of how long did it take to get the resource the app needed, regardless of any retries that might have happened in order to get the resource.