diff options
| author | Patrick | 2023-05-28 17:27:25 +0200 |
|---|---|---|
| committer | Patrick | 2023-05-28 17:27:25 +0200 |
| commit | d382d193cb2d550cc769afa76e55823865a39023 (patch) | |
| tree | 45ee240e02e28ed65b566fb8ece7ad0fbbe4064e /examples | |
| parent | c1547dd3565f979d08a9e8e9eec8f42956e6901c (diff) | |
| download | matrix_esp_thesis-d382d193cb2d550cc769afa76e55823865a39023.tar.gz matrix_esp_thesis-d382d193cb2d550cc769afa76e55823865a39023.zip | |
send example, http PUT
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/Send.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/Send.c b/examples/Send.c index 8786be9..e595ba7 100644 --- a/examples/Send.c +++ b/examples/Send.c @@ -1,26 +1,28 @@ #include <matrix.h>
-#define SERVER "matrix.org"
+#define SERVER "https://matrix.org"
#define ACCESS_TOKEN "syt_cHNjaG8_yBvTjVTquGCikvsAenOJ_49mBMO"
#define DEVICE_ID "MAZNCCZLBR"
-#define ROOM_ID "!jhpZBTbckszblMYjMK:matrix.org"
+#define ROOM_ID "!koVStwyiiKcBVbXZYz:matrix.org"
int
main()
{
MatrixClient client;
- MatrixClientCreate(&client,
- SERVER, strlen(SERVER));
+ MatrixClientInit(&client,
+ SERVER);
MatrixHttpInit(&client);
MatrixClientSetAccessToken(&client,
- ACCESS_TOKEN, strlen(ACCESS_TOKEN));
+ ACCESS_TOKEN);
MatrixClientSendEvent(&client,
ROOM_ID,
"m.room.message",
"{\"body\":\"Hello\",\"msgtype\":\"m.text\"}");
+
+ MatrixHttpDeinit(&client);
return 0;
}
\ No newline at end of file |
