Fix MatrixHTTPAPI's _send() for empty requests
It now correctly sends an empty JSON object.
This commit is contained in:
parent
9ff67c008a
commit
48ce66e73d
@ -698,8 +698,8 @@ _send(MatrixHTTPAPI *api,
|
|||||||
json_generator_set_root(generator, (JsonNode *)content);
|
json_generator_set_root(generator, (JsonNode *)content);
|
||||||
data = json_generator_to_data(generator, &datalen);
|
data = json_generator_to_data(generator, &datalen);
|
||||||
} else {
|
} else {
|
||||||
data = g_strdup("");
|
data = g_strdup("{}");
|
||||||
datalen = 0;
|
datalen = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_debug("Sending (%s %s): %s", method, url, data);
|
g_debug("Sending (%s %s): %s", method, url, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user