summaryrefslogtreecommitdiff
path: root/request.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-17 22:12:36 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-17 22:12:36 +0800
commit4aef78b56e9ee5f51ce80171288242c8881842f0 (patch)
tree9ab4c915bc5bdadd05adfe6693f497bf23c7b299 /request.c
parent71e1c7fc557e68743c4a8028b2d6675639be16cc (diff)
Rename fetch to response
Diffstat (limited to 'request.c')
-rw-r--r--request.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/request.c b/request.c
index 0912fa8..7c92a51 100644
--- a/request.c
+++ b/request.c
@@ -4,17 +4,17 @@
emscripten_fetch_attr_t attr;
#else
CURL *curl;
-size_t append(char *data, size_t size, size_t nmemb, icclient_fetch_t *fetch)
+size_t append(char *data, size_t size, size_t nmemb, icclient_response *response)
{
size_t realsize = size * nmemb;
- fetch->data = realloc(fetch->data, fetch->numBytes + realsize + 1);
- memcpy(&(fetch->data[fetch->numBytes]), data, realsize);
- fetch->numBytes += realsize;
- fetch->data[fetch->numBytes] = '\0';
+ response->data = realloc(response->data, response->numBytes + realsize + 1);
+ memcpy(&(response->data[response->numBytes]), data, realsize);
+ response->numBytes += realsize;
+ response->data[response->numBytes] = '\0';
return realsize;
}
#endif
extern inline void init(const char *);
-extern inline void request(void (*)(icclient_fetch_t *), void (*)(void *), struct body *, char *, ...);
+extern inline void request(void (*)(icclient_response *), void (*)(void *), struct body *, char *, ...);
extern inline void cleanup();