CURL_EASY_OPTION_BY_NAME(3)

πŸ’… curl_easy_option_by_name(3) β€” like, the whole entire manual, bestie

okay so this is a page from the Library Functions Manual and it's about curl_easy_option_by_name and honestly? it's a little icon. let's get into it ✨


πŸŽ€ NAME πŸŽ€

curl_easy_option_by_name β€” find an easy setopt option by name, no cap πŸ”

✨ SYNOPSIS ✨

#include <curl/curl.h>

const struct curl_easyoption *curl_easy_option_by_name(const char *name);

πŸ¦‹ DESCRIPTION πŸ¦‹

so you hand it a name, and it gives you back a pointer to the curl_easyoption struct that holds all the info about the curl_easy_setopt(3) option with that name. it's giving personal assistant energy, fr fr 🫢

the name goes in without the CURLOPT_ prefix β€” like, leave the prefix at home, it's not invited πŸ’… β€” and the name comparison is made case insensitive, so don't stress about your caps lock situation, bestie.

and if libcurl has no option with the given name? it just returns NULL. no option, no problem, no drama πŸ™ˆ

🌈 PROTOCOLS 🌈

this functionality affects all supported protocols β€” every single one, periodt πŸ‘‘

πŸ’– EXAMPLE πŸ’–

int main(void)
{
  const struct curl_easyoption *opt = curl_easy_option_by_name("URL");
  if(opt) {
    printf("This option wants CURLoption %x\n", (int)opt->id);
  }
}

main character main function ngl ⭐

πŸ“ AVAILABILITY πŸ“

added in curl 7.73.0 β€” vintage but still slaying 🧚

πŸ”₯ RETURN VALUE πŸ”₯

a pointer to the curl_easyoption struct for the option β€” or NULL. that's the whole vibe check 😭

🌸 SEE ALSO 🌸

like the whole friend group, obsessed 🫢


lowkey reminder bestie: this is libcurl documentation, and the page is dated 2026-10-12 β€” so like, mark your calendar or whatever πŸ’œ

okay that's the whole manual, you ate that, go forth and find your options by name πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from