-/**
- * Dispatch the request 'req' with the 'context' to the
- * method of 'api' and 'verb'.
- * @param req the request to dispatch
- * @param context the context of the request
- * @param api the api of the verb
- * @param verb the verb within the api
- */
-void afb_apis_call(struct afb_req req, struct afb_context *context, const char *api, const char *verb)
-{
- const struct api_desc *a;
-
- /* init hooking the request */
- req = afb_hook_req_call(req, context, api, verb);
-
- /* search the api */
- a = search(api);
- if (!a)
- afb_req_fail(req, "fail", "api not found");
- else {
- context->api_key = a->api.closure;
- a->api.call(a->api.closure, req, context, verb);
- }
-}
-