curl_easy_option_by_id.3 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2021, 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. .\" **************************************************************************
  22. .TH curl_easy_option_by_id 3 "27 Aug 2020" "libcurl 7.73.0" "libcurl Manual"
  23. .SH NAME
  24. curl_easy_option_by_id - find an easy setopt option by id
  25. .SH SYNOPSIS
  26. .nf
  27. #include <curl/curl.h>
  28. const struct curl_easyoption *curl_easy_option_by_id(CURLoption id);
  29. .fi
  30. .SH DESCRIPTION
  31. Given a CURLoption \fBid\fP, this function returns a pointer to the
  32. curl_easyoption struct, holding information about the
  33. \fIcurl_easy_setopt(3)\fP option using that id. The option id is the CURLOPT_
  34. prefix ones provided in the standard curl/curl.h header file. This function
  35. will return the non-aliases version for the cases where there is an alias
  36. function as well.
  37. If libcurl has no option with the given id, this function returns NULL.
  38. .SH EXAMPLE
  39. .nf
  40. const struct curl_easyoption *opt = curl_easy_option_by_id(CURLOPT_URL);
  41. if(opt) {
  42. printf("This option wants type %x\\n", opt->type);
  43. }
  44. .fi
  45. .SH AVAILABILITY
  46. This function was added in libcurl 7.73.0
  47. .SH RETURN VALUE
  48. A pointer to the curl_easyoption struct for the option or NULL.
  49. .SH "SEE ALSO"
  50. .BR curl_easy_option_by_name "(3)," curl_easy_option_next "(3),"
  51. .BR curl_easy_setopt "(3),"