I am trying to retrieve json body from http response (below code) but
ast_http_get_json method expects ast_variable which is probably list of
headers. so question is how to I get this from client (or client->ser).
Suggestions most welcome !

res_http_websocket.c -> websocket_client_handshake_get_response()

struct ast_variable temp;
struct ast_json *body = ast_http_get_json(client->ser, &temp);
ast_log(LOG_ERROR, "After get json");
struct ast_json *field = ast_json_object_get(body, "sid");
ast_log(LOG_ERROR, "After get sid");
if (field) {
ast_log(LOG_ERROR, "received sid=%s",ast_json_string_get(field));
}


thanks,
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to