From 710866e180a9d02c99ad1ce64a2f6bcaff2c975b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 14 Mar 2023 13:00:41 +0800 Subject: Response now carries URL info just like Emscripten --- request.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'request.c') diff --git a/request.c b/request.c index e8dfcf7..32e46f0 100644 --- a/request.c +++ b/request.c @@ -160,6 +160,8 @@ void request(void (*handler)(interchange_response *), void (*callback)(void *), curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, append); interchange_response *response = malloc(sizeof(interchange_response)); + response->url = malloc(length + 1); + strcpy(response->url, url); response->data = malloc(1); response->numBytes = 0; response->userData = callback; -- cgit v1.2.3