gnurl_slist_free_all(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

Welcome to gnurl_slist_free_all(3), bestie β€” this is the libgnurl Manual page, and it's here to teach you about curl_slist_free_all() ✨


πŸ’– NAME πŸ’–

curl_slist_free_all β€” free an entire curl_slist list 🫢

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

void curl_slist_free_all(struct curl_slist *list);

🌸 DESCRIPTION 🌸

Okay so curl_slist_free_all() removes all traces of a previously built curl_slist linked list. Like, gone-gone. Cleanup slay πŸ’…

And if you pass in a NULL pointer in list? This function just returns immediately with no action. No drama, no notes, it simply leaves the group chat 😌

πŸŽ€ RETURN VALUE πŸŽ€

Nothing. Literally nothing. It's giving void energy πŸ’€

πŸ¦‹ EXAMPLE πŸ¦‹

CURL *handle;
struct curl_slist *slist=NULL;

slist = curl_slist_append(slist, "X-libcurl: coolness");

if (slist == NULL)
  return -1;

curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);

curl_easy_perform(handle);

curl_slist_free_all(slist); /* free the list again */

🌈 SEE ALSO 🌈

  • curl_slist_append(3), β€” yes bestie, the comma is literally included in the reference πŸ’…

Made with source/version libcurl 7.0 energy, dated 5 March 2001 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from