Twitter finagle has a filter concept, they can be built and applied to a service to add functions to the service, for example, adding a timeout or retry, the concept and example can be found here: http://twitter.imtqy.com/finagle/guide /ServicesAndFilters.html
In playframework, you call a third-party service as follows:
WS.url(requestUrl).get
The network is unstable, one solution is to add a retry mechanism, when get failed, we can resend the URL for retry.
We know how to add repeat for this case, I just want to know if there is a similar filter concept in playframework, so you can combine them and add new functions to call WS.
source
share