Is there a similar twitter finagle filter concept in the game structure

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.

+4
source share
1 answer

There are no such filters out of the box on Play. However, you can add them yourself using the Action composition as described in the official documentation.

-1
source

All Articles