2
0

curl_easy_option_by_name.3 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .TH curl_easy_option_by_name 3 "27 Aug 2020" "libcurl" "libcurl"
  25. .SH NAME
  26. curl_easy_option_by_name - find an easy setopt option by name
  27. .SH SYNOPSIS
  28. .nf
  29. #include <curl/curl.h>
  30. const struct curl_easyoption *curl_easy_option_by_name(const char *name);
  31. .fi
  32. .SH DESCRIPTION
  33. Given a \fBname\fP, this function returns a pointer to the
  34. \fIcurl_easyoption\fP struct, holding information about the
  35. \fIcurl_easy_setopt(3)\fP option using that name. The name should be specified
  36. without the "CURLOPT_" prefix and the name comparison is made case
  37. insensitive.
  38. If libcurl has no option with the given name, this function returns NULL.
  39. .SH EXAMPLE
  40. .nf
  41. const struct curl_easyoption *opt = curl_easy_option_by_name("URL");
  42. if(opt) {
  43. printf("This option wants CURLoption %x\\n", (int)opt->id);
  44. }
  45. .fi
  46. .SH AVAILABILITY
  47. This function was added in libcurl 7.73.0
  48. .SH RETURN VALUE
  49. A pointer to the \fIcurl_easyoption\fP struct for the option or NULL.
  50. .SH "SEE ALSO"
  51. .BR curl_easy_option_next "(3)," curl_easy_option_by_id "(3),"
  52. .BR curl_easy_setopt "(3),"