#include #include #include #include #include #include #include #include bool ASPing(const ParseeConfig *conf) { HttpClientContext *ctx = NULL; HashMap *json = NULL; char *path; bool ret; if (!conf) { return false; } path = StrConcat(3, "/_matrix/client/v1/appservice/", "Parsee%20XMPP", "/ping" ); ctx = ParseeCreateRequest( conf, HTTP_POST, path ); Free(path); json = HashMapCreate(); ASAuthenticateRequest(conf, ctx); ret = ParseeSetRequestJSON(ctx, json) == HTTP_OK; HttpClientContextFree(ctx); JsonFree(json); return ret; }