make handle_request return callable

This simplifies code a bit.

Change-Id: I553174661f3a70e3d89fb2336832b25111052a0b