diff options
| author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-01-25 21:16:56 +0800 |
|---|---|---|
| committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-01-25 21:16:56 +0800 |
| commit | 0e8e63c8199417d9c920e1a6b9a2a90ef4e595de (patch) | |
| tree | c66419605cbfaa0a54ef71dea7049b4f755202c9 /request.c | |
| parent | 39390f76cb75cfd5830495301cb08221e7934d5b (diff) | |
Writes/reads to/from a cookie file
Diffstat (limited to 'request.c')
| -rw-r--r-- | request.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -18,6 +18,7 @@ extern emscripten_fetch_attr_t attr; extern char *sampleurl; extern char *cainfo; +extern char *cookiefile; struct container { struct curl_httppost *post; @@ -148,7 +149,8 @@ void request(void (*handler)(interchange_response *), void (*callback)(void *), #else CURL *curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); + curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookiefile); + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookiefile); if (cainfo) curl_easy_setopt(curl, CURLOPT_CAINFO, cainfo); #ifdef DEBUG |