summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/main.c b/main.c
index 5ae39c5..ec3dbf6 100644
--- a/main.c
+++ b/main.c
@@ -2,6 +2,8 @@
2/* copyright (c) 2022 grunfink - MIT license */ 2/* copyright (c) 2022 grunfink - MIT license */
3 3
4#include "xs.h" 4#include "xs.h"
5#include "xs_encdec.h"
6#include "xs_json.h"
5 7
6#include "snac.h" 8#include "snac.h"
7 9
@@ -19,10 +21,18 @@ int main(int argc, char *argv[])
19 int status; 21 int status;
20 d_char *payload; 22 d_char *payload;
21 int p_size; 23 int p_size;
22 http_signed_request(&snac, "GET", "https://comam.es/snac/jessie", 24 xs *response;
25
26 response = http_signed_request(&snac, "GET", "https://mastodon.social/users/VictorMoral",
23 headers, NULL, 0, &status, &payload, &p_size); 27 headers, NULL, 0, &status, &payload, &p_size);
24 28
25 { 29 {
30 xs *j1 = xs_json_dumps_pp(response, 4);
31 printf("response:\n%s\n", j1);
32 printf("payload:\n%s\n", payload);
33 }
34
35 {
26 xs *list = queue(&snac); 36 xs *list = queue(&snac);
27 char *p, *fn; 37 char *p, *fn;
28 38