CURLOPT_COOKIE.3 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2014, 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 http://curl.haxx.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. .\"
  23. .TH CURLOPT_COOKIE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_COOKIE \- set contents of HTTP Cookie header
  26. .SH SYNOPSIS
  27. #include <curl/curl.h>
  28. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);
  29. .SH DESCRIPTION
  30. Pass a pointer to a zero terminated string as parameter. It will be used to
  31. set a cookie in the HTTP request. The format of the string should be
  32. NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
  33. should contain.
  34. If you need to set multiple cookies, set them all using a single option
  35. concatenated like this: "name1=content1; name2=content2;" etc.
  36. This option sets the cookie header explicitly in the outgoing request(s). If
  37. multiple requests are done due to authentication, followed redirections or
  38. similar, they will all get this cookie passed on.
  39. Using this option multiple times will only make the latest string override the
  40. previous ones.
  41. This option will not enable the cookie engine. Use \fICURLOPT_COOKIEFILE(3)\fP
  42. or \fICURLOPT_COOKIEJAR(3)\fP to enable parsing and sending cookies
  43. automatically.
  44. .SH DEFAULT
  45. NULL, no cookies
  46. .SH PROTOCOLS
  47. HTTP
  48. .SH EXAMPLE
  49. TODO
  50. .SH AVAILABILITY
  51. If HTTP is enabled
  52. .SH RETURN VALUE
  53. Returns CURLE_OK if HTTP is enabled, CURLE_UNKNOWN_OPTION if not, or
  54. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  55. .SH "SEE ALSO"
  56. .BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), "
  57. .BR CURLOPT_HTTPHEADER "(3), "