CURLOPT_HSTSWRITEDATA.3 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. .\"
  25. .TH CURLOPT_HSTSWRITEDATA 3 "14 Sep 2020" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_HSTSWRITEDATA \- pointer passed to the HSTS write callback
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void *pointer);
  32. .fi
  33. .SH DESCRIPTION
  34. Data \fIpointer\fP to pass to the HSTS write function. If you use the
  35. \fICURLOPT_HSTSWRITEFUNCTION(3)\fP option, this is the pointer you will get as
  36. input in the fourth argument to the callback.
  37. This option does not enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
  38. do that.
  39. .SH DEFAULT
  40. NULL
  41. .SH PROTOCOLS
  42. This feature is only used for HTTP(S) transfer.
  43. .SH EXAMPLE
  44. .nf
  45. CURL *curl = curl_easy_init();
  46. struct MyData this;
  47. if(curl) {
  48. curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
  49. /* pass pointer that gets passed in to the
  50. CURLOPT_HSTSWRITEFUNCTION callback */
  51. curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &this);
  52. curl_easy_perform(curl);
  53. }
  54. .fi
  55. .SH AVAILABILITY
  56. Added in 7.74.0
  57. .SH RETURN VALUE
  58. This will return CURLE_OK.
  59. .SH "SEE ALSO"
  60. .BR CURLOPT_HSTSWRITEFUNCTION "(3), " CURLOPT_HSTSREADDATA "(3), "
  61. .BR CURLOPT_HSTSREADFUNCTION "(3), "