+static json_object *afbJsonType;
+
+
+// Sample Generic Ping Debug API
+PUBLIC json_object* apiPingTest(AFB_request *request) {
+ static pingcount = 0;
+ json_object *response;
+ char query [256];
+ char session[256];
+
+ int len;
+ AFB_clientCtx *client=request->client; // get client context from request
+
+ // request all query key/value
+ len = getQueryAll (request, query, sizeof(query));
+ if (len == 0) strncpy (query, "NoSearchQueryList", sizeof(query));
+
+ // check if we have some post data
+ if (request->post == NULL) request->post="NoData";
+
+ // check is we have a session and a plugin handle
+ if (client == NULL) strcpy (session,"NoSession");
+ else snprintf(session, sizeof(session),"uuid=%s token=%s ctx=0x%x handle=0x%x", client->uuid, client->token, client->ctx, client->ctx);
+
+ // return response to caller
+ response = jsonNewMessage(AFB_SUCCESS, "Ping Binder Daemon count=%d CtxtId=%d query={%s} session={%s} PostData: [%s] "
+ , pingcount++, request->client->cid, query, session, request->post);
+ return (response);
+}