\input texinfo @c -*- Mode: texinfo; Fillcolumn: 70; -*-
@c %**start of header

@c Copyright @copyright{} 2007, 2011, 2013, 2014, 2019, 2025 Michael L. Gran

@c Permission is hereby granted, free of charge, to any person obtaining a
@c copy of these software and associated documentation files (the
@c "Software"), to deal in the Software without restriction, including
@c without limitation the rights to use, copy, modify, merge, publish,
@c distribute, distribute with modifications, sublicense, and/or sell
@c copies of the Software, and to permit persons to whom the Software is
@c furnished to do so, subject to the following conditions:

@c The above copyright notice and this permission notice shall be included
@c in all copies or substantial portions of the Software.

@c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
@c OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@c MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@c IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
@c DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
@c OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
@c THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@c Except as contained in this notice, the name(s) of the above copyright
@c holders shall not be used in advertising or otherwise to promote the
@c sale, use or other dealings in this Software without prior written
@c authorization.

@setfilename guile-curl.info
@include version.texi
@settitle Curl @value{VERSION}

@syncodeindex fn cp
@syncodeindex vr cp
@syncodeindex ky cp
@syncodeindex pg cp
@syncodeindex tp cp

@c %**end of header

@copying
This manual is for @code{guile-curl}, a Guile net client library,
(version @value{VERSION}, @value{UPDATED}).  @code{guile-curl}
provides bindings for the underlying libcurl library, which provides
functionality for accessing files via urls.

Copyright @copyright{} 2007, 2011, 2013, 2014, 2019, 2025 Michael L. Gran

Includes portions of the libcurl documentation, which is Copyright
@copyright{} 1998 - 2015 Daniel Stenberg, et al.
@end copying

@dircategory The Algorithmic Language Scheme
@direntry
* Guile Curl: (guile-curl).     A URL-fetching library for Guile.
@end direntry

@titlepage
@title A Guile Curl Library
@subtitle For version @value{VERSION}, @value{UPDATED}
@author Michael L. Gran


@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@summarycontents

@contents


@ifnottex
@node Top, Introduction, (dir), (dir)
@top A Guile Curl Library
@insertcopying
@end ifnottex

@menu
* Introduction::
* Reference::
* Index::

@detailmenu
 --- The Detailed Node Listing ---

Tutorial

* Fetching from an HTTP server::

Fetching from an HTTP server

* Performing the HTTP GET::
* Using web response procedures::
* Handling String Encodings::

Reference

* Procedures::
* Options for setopt::
* Error Codes::

Options for setopt

* Option Table::
* Option Data Types::

Option Data Types

* Postfields::
* Integer Constants for protocols::
* Integer Constants for proxytype::
* Integer Constants for netrc::
* Integer Constants for httpauth::
* Integer Constants for postredir::
* Integer Constants for http-version::
* Integer Constants for ftpsslauth::
* Integer Constants for ftp-ssl-ccc::
* Integer Constants for ftp-filemethod::
* Integer Constants for rtsp-request::
* Integer Constants for sslversion::
* Integer Constants for ipresolve::
* Integer Constants for use-ssl::
* Integer Constants for gssapi-delegation::
* Integer Constants for ssh-auth-types::

@end detailmenu
@end menu

@node Introduction, Reference, Top, Top
@chapter Tutorial

This library has procedures that allow Guile to do client-side URL
transfers, like requesting documents from http or ftp servers.  It is
based on the libcurl library.

Before using these functions, you must first load the library.  If the
library built and installed correctly, you should be able to load the
library in the usual way by using @code{(use-modules (curl))}.

To transfer a file, you start off by creating a handle using
@code{curl-easy-init}.  @code{curl-easy-init} is a procecure that
takes no arguments and returns a handle.  The handle represents a
single connection between computers using some standard protocol.

The handle holds opaque information used by the underlying
@code{libcurl} library, so displaying it or writing it doesn't produce
much useful information beyond the location of a pointer in memory.

Before the handle can be used, it must first be given information
about the connection and transfer that it will do.  The procedure
@code{curl-easy-setopt} is used to tell this handle's connection how
to behave.  There are many dozens of options that can be set, but,
at a minimum, it just needs a URL.

Then, to initiate the transfer, the procedure @code{curl-easy-perform}
is called.  It can return the requested resource as either a bytevector
or a string.  If the data is returned as a string, no coding conversions
will be performed, e.g., the program will presume that the data is in
the Latin-1 encoding.

@menu
* Fetching from an HTTP server::
@end menu

@node Fetching from an HTTP server,  , Introduction, Introduction
@section Fetching from an HTTP server

Let's begin with the most familiar case: fetching data from
a webserver.

Guile 3.0 already has a nice set of functions to handle fetching from
an HTTP server, so there is no need to use this library for simple use
cases like this. But @code{guile-curl} may still be of value if you
are trying to use @code{https} or POST or other more complicated HTTP
requests.

@menu
* Performing the HTTP GET::
* Using web response procedures::
* Handling String Encodings::
@end menu

@node Performing the HTTP GET, Using web response procedures, Fetching from an HTTP server, Fetching from an HTTP server
@subsection Performing the HTTP GET

The following code will get a web page from an HTTP server and the
pass it as a string to the @code{display} procedure.  @code{display}
will write the string to the current output port.

@lisp
@verbatiminclude ex_http_simple_get.scm
@end lisp

The returned string is also read in as binary and put into a string of
8-bit, single byte characters.  But, since Guile's characters are
Unicode codepoints, this, in effect, means that the response was
interpreted in the ISO-8859-1 (or Latin-1) encoding.

You can also fetch the resource as a bytevector by adding the optional
argument @code{#t} to the call to @code{curl-easy-perform}.  Fetching a
result as a bytevector is useful as it can then be re-encoded into UTF-8
by using the @code{utf8->string} procedure or to any character encoding
by using the @code{bytevector->string} procedure.

The following code will fetch a web page from an HTTP server as a
bytevector, convert the bytevector to a string interpreting its
contents as UTF-8 encoded data, and then pass the string to the
@code{display} procedure.  @code{display} will write the string to the
current output port.

@lisp
@verbatiminclude ex_http_simple_get_utf8.scm
@end lisp

In summary
@itemize @bullet
@item
Use @code{(curl-easy-perform handle)} to get US-ASCII or ISO-8859-1
@item
Use @code{(curl-easy-perform handle #t)} to get a bytevector
@item
Use @code{(utf8->string (curl-easy-perform handle #t))} to get a UTF-8 string
@end itemize

That's pretty much all there is to it for a simple fetch.  Beyond
that, there are dozens of options that can be set by
@code{curl-easy-setopt} that change how the request is
performed. Easy-peasy.

But things get much, much worse if you don't know the encoding of your
data before hand and have to learn it from the HTTP server.  In that
case, things get complicated.

@node Using web response procedures, Handling String Encodings, Performing the HTTP GET, Fetching from an HTTP server
@subsection Using web response procedures

The @code{(web response)} module can be used to help
interpret the response from an HTTP server.  The module has many
procedures for the proper parsing of the HTTP header.  But since
@code{(web response)} was written to expect data from Guile's internal
HTTP client @code{(web client)}, we need to do some simple gymnastics
to convince it that the Curl-fetched data is as good as the @code{(web
client)}-fetched data.

First, we need to fetch both the HTTP headers as well as the body.  To
do this, the @code{curl-easy-setopt} option @code{'header} must be
@code{#t}.  When this option is set, the HTTP headers are pre-pended
to the body.

Second, we need to create a string port from the response.

@example
@verbatiminclude ex_http_web_response.scm
@end example

@node Handling String Encodings,  , Using web response procedures, Fetching from an HTTP server
@subsection Handling String Encodings

The result passed to you from @code{curl-easy-perform} will either be
as a string or as a bytevector, depending on the value of the 2nd
parameter.  The default is to return a string, which you will receive
if you call it this way.

@lisp
(curl-easy-perform handle)
@end lisp

or

@lisp
(curl-easy-perform handle #f)
@end lisp

The string will always be returned in the ISO-8859-1 encoding, aka the
Latin-1 encoding.  This is because converting data in some unknown
format to Latin-1 will never fail.  It may not be right, but, the
conversion won't fail.

If you know that the data to be fetched is to be interpreted as a
UTF-8 string, you should request the data as a bytevector and then
convert the result to a string, like so...

@lisp
(utf8->string (curl-easy-perform handle #t)))
@end lisp

But if you don't know the encoding, things are gonna get way more
complicated.

The first and best place to look for an HTTP document's encoding is in
the @code{Content-Type} field of the HTTP headers.  In the headers,
there may be a @code{Content-Type} header line like the following.

@verbatim
Content-Type: text/html; charset=utf-8
@end verbatim

In the above case, the encoding of the document is listed as UTF-8
text.  The previous example demonstrates how to unpack a HTTP header
to find its encoding.

But, not all HTTP-served documents have a @code{charset} line in the
@code{Content-Type} header.  If it isn't there, the next most
authoritative place to look for an encoding is in the XML declaration
if this is an XHTML document. But XHTML is uncommon.

The another place to check is in a @code{meta} element in the HTML
document itself.  The @code{meta} element is in the HTML and might
look like the following.

@verbatim
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
@end verbatim

Yet another place that might be the source of encoding information
for the resulting data is a UTF-16 BOM.  It is a bit of a muddle.

OK.  Once you finally know what the encoding of your HTML document is,
you can convert the body of your request into a string.  If you've
requested the HTML document as a bytevector, the
@code{bytevector->string} procedure could be used to make the conversion.

@node Reference, Index, Introduction, Top
@chapter Reference

@menu
* Procedures::
* Options for setopt::
* Error Codes::
@end menu


@node Procedures, Options for setopt, Reference, Reference
@section Procedures

These are the procedures provided by the library.

@deffn Procedure curl-easy-init
Returns a curl handle that you must use as input to other functions.
This handle represents one connection to a server.  If it fails, it
will throw an error.
@end deffn

@deffn Procedure curl-easy-handle? x
Returns @code{#t} if @var{x} is a curl handle such as would be
created by @code{curl-easy-handle}.  @code{#f} otherwise.
@end deffn

@deffn Procedure curl-easy-cleanup handle
This forcibly closes all connections that this handle has used and
have possibly kept open until now.  Any use of the handle after it has
been closed is invalid.  The return value is unspecified.

Calling this procedure is optional: handles will automatically
be freed when no longer in use.
@end deffn

@deffn Procedure curl-easy-reset handle
@quotation
Re-initializes all options previously set on a specified CURL handle
to its default values. This puts back the handle to the same state as
it was in when it was just created with [@code{curl-easy-init}].

It does not change the following information kept in the handle: live
connections, the Session ID cache, the DNS cache, the cookies and
shares.@footnote{from the libcurl 7.12.1 curl_easy_reset man page}
@end quotation
The return value is unspecified.
@end deffn

@deffn Procedure curl-easy-perform handle #:optional bytevector? #:optional header?
From the C documentation
@quotation
This function is called after the init and all the
[@code{curl-easy-setopt}] calls are made, and will perform the
transfer as described in the options.  It must be called with the same
handle as input as the [@code{curl-easy-init}] call returned.

You can do any amount of calls to [@code{curl-easy-perform}] while
using the same handle. If you intend to transfer more than one file,
you are even encouraged to do so. libcurl will then attempt to re-use
the same connection for the following transfers, thus making the
operations faster, less CPU intense and using less network
resources. Just note that you will have to use
[@code{curl-easy-setopt}] between the invokes to set options for the
following [@code{curl-easy-perform}]

You must never call this function simultaneously from two places using
the same handle.  Let the function return first before invoking it
another time. If you want parallel transfers, you must use several
curl handles.@footnote{from the libcurl 7.7 curl_easy_perform man
page}
@end quotation

The default behavior is to return a string containing
the resource.  There is no way to handle the encoding of the string:
the binary data will mapped byte-by-byte to a string containing
codepoints U+0000 through U+00FF. If the optional @var{bytevector?}
parameter is given and is set to @code{#t}, the resource will be
returned as a bytevector.

It returns either a string containing the resource, a bytevector
containing the resource, or @code{#f} on failure.  For information
about the failure, you can call @code{curl-error-string}.

If the optional @code{header?} parameter is set to @code{#t}, it
returns a list of two elements.  The first is a string that contains
any headers, such as HTTP headers, associated with this operation.
The second is the body of the request, either as a string or as a
bytevector, as described above.
@end deffn

@deffn Procedure curl-error-string
If a call to @code{curl-easy-perform} fails, calling this function
will return information about the last error as a string.
@end deffn

@deffn Procedure curl-error-code
If a call to @code{curl-easy-perform} fails, calling this function
will return information about the last error as an integer.  These
integers come from the libcurl library and are defined in its header
file <curl/curl.h>.
@end deffn

@deffn Procedure curl-easy-setopt handle option info

This procedure sets the options for this @var{handle} that will
describe what will happen when @code{curl-easy-perform} is called.  At
a minimum, @code{curl-easy-setopt} must be called at least once per
handle to set the @code{url} option.  @var{option} is a symbol name of
an option, and @var{info} is additional information needed for the
option.  @xref{Options for setopt}, for a table of options and their
associated required type.

@quotation important
Options for a handle are not cleared after @code{curl-easy-perform} is
called.  Make sure to call @code{curl-easy-reset} when you want the
options for this handle to be reset.
@end quotation

This may throw an error if @var{handle} is already closed or if
@var{option} is not the correct type.
@end deffn

@deffn Procedure curl-easy-getinfo handle option
This procedure will extract internal information from a curl handle.
The @var{option} is an symbol that indicates the value to be
returned. The returned value is either the requested value or
is @code{#f} on error.

You must execute an operation on a handle with
@code{curl-easy-perform} before @code{curl-easy-getinfo} can be called
on that handle.

@quotation important
Care must be taken not do disrupt internal values managed by
curl. For example, this procedure can return a file descriptor which
is managed by curl and should not be closed.
@end quotation

This may throw an error if @var{handle} is already closed or has not
yet been used to perform an operation.  Also, it may thrown an error
if @var{option} is not available for the version of curl being used.
@end deffn

The @code{curl-easy-getinfo} procedure takes one of the option
symbols give in the first column of the table below. These symbols
are shorthand for the underlying CURL option given in the 2nd column.

Note that whether these options are available is dependent on the
version of curl being used.  To verify that a particular option is
available, check that the defined constant is not @code{#f}.  For
example, to ensure the the @code{'xfer-id} option is available, check
that the @code{CURLINFO_XFER_ID} evaluates to an integer.

@multitable @columnfractions .25 .55 .25
@headitem Option Symbol @tab C Library Name @tab Output Type

@item activesocket @tab CURLINFO_ACTIVESOCKET @tab integer file descriptor
@item appconnect-time @tab CURLINFO_APPCONNECT_TIME @tab real seconds
@item appconnect-time-t @tab CURLINFO_APPCONNECT_TIME_T @tab integer microseconds
@item cainfo @tab CURLINFO_CAINFO @tab string
@item capath @tab CURLINFO_CAPATH @tab string
@c @item certinfo @tab CURLINFO_CERTINFO @tab integer
@item condition-unmet @tab CURLINFO_CONDITION_UNMET @tab integer 1 or zero
@item connect-time @tab CURLINFO_CONNECT_TIME @tab real seconds
@item connect-time-t @tab CURLINFO_CONNECT_TIME_T @tab integer microseconds
@item conn-id @tab CURLINFO_CONN_ID @tab integer
@item content-length-download-t @tab CURLINFO_CONTENT_LENGTH_DOWNLOAD_T @tab integer
@item content-length-upload-t @tab CURLINFO_CONTENT_LENGTH_UPLOAD_T @tab integer
@item cookielist @tab CURLINFO_COOKIELIST @tab list of strings
@item earlydata-sent-t @tab CURLINFO_EARLYDATA_SENT_T @tab integer bytes
@item effective-method @tab CURLINFO_EFFECTIVE_METHOD @tab string
@item effective-url @tab CURLINFO_EFFECTIVE_URL @tab string
@item filetime @tab CURLINFO_FILETIME @tab integer
@item filetime-t @tab CURLINFO_FILETIME_T @tab integer
@item ftp-entry-path @tab CURLINFO_FTP_ENTRY_PATH @tab string
@item header-size @tab CURLINFO_HEADER_SIZE @tab integer
@item httpauth-avail @tab CURLINFO_HTTPAUTH_AVAIL @tab bitfield of CURLAUTH constants @xref{Integer Constants for httpauth}
@item httpauth-used @tab CURLINFO_HTTPAUTH_USED @tab bitfield of CURLAUTH constants @xref{Integer Constants for httpauth}
@item http-connectcode @tab CURLINFO_HTTP_CONNECTCODE @tab integer
@item http-version @tab CURLINFO_HTTP_VERSION @tab integer of CURL_HTTP_VERSION constants @xref{Integer Constants for http-version}
@item local-ip @tab CURLINFO_LOCAL_IP @tab string
@item local-port @tab CURLINFO_LOCAL_PORT @tab integer
@item namelookup-time @tab CURLINFO_NAMELOOKUP_TIME @tab real seconds
@item namelookup-time-t @tab CURLINFO_NAMELOOKUP_TIME_T @tab integer microseconds
@item num-connects @tab CURLINFO_NUM_CONNECTS @tab integer
@item os-errno @tab CURLINFO_OS_ERRNO @tab integer
@item posttransfer-time-t @tab CURLINFO_POSTTRANSFER_TIME_T @tab integer microseconds
@item pretransfer-time @tab CURLINFO_PRETRANSFER_TIME @tab real seconds
@item pretransfer-time-t @tab CURLINFO_PRETRANSFER_TIME_T @tab integer microseconds
@item primary-ip @tab CURLINFO_PRIMARY_IP @tab string
@item primary-port @tab CURLINFO_PRIMARY_PORT @tab integer
@item proxyauth-avail @tab CURLINFO_PROXYAUTH_AVAIL @tab bitfield of CURLAUTH constants
@item proxyauth-used @tab CURLINFO_PROXYAUTH_USED @tab bitfield of CURLAUTH constants
@item proxy-error @tab CURLINFO_PROXY_ERROR @tab integer of a CURLPX constant
@item proxy-ssl-verifyresult @tab CURLINFO_PROXY_SSL_VERIFYRESULT @tab integer
@item queue-time-t @tab CURLINFO_QUEUE_TIME_T @tab integer microseconds
@item redirect-count @tab CURLINFO_REDIRECT_COUNT @tab integer
@item redirect-time @tab CURLINFO_REDIRECT_TIME @tab real seconds
@item redirect-time-t @tab CURLINFO_REDIRECT_TIME_T @tab integer microseconds
@item redirect-url @tab CURLINFO_REDIRECT_URL @tab string
@item referer @tab CURLINFO_REFERER @tab string
@item request-size @tab CURLINFO_REQUEST_SIZE @tab integer
@item response-code @tab CURLINFO_RESPONSE_CODE @tab integer
@item retry-after @tab CURLINFO_RETRY_AFTER @tab integer
@item rtsp-client-cseq @tab CURLINFO_RTSP_CLIENT_CSEQ @tab integer CSeq
@item rtsp-cseq-recv @tab CURLINFO_RTSP_CSEQ_RECV @tab integer CSeq
@item rtsp-server-cseq @tab CURLINFO_RTSP_SERVER_CSEQ @tab integer CSeq
@item rtsp-session-id @tab CURLINFO_RTSP_SESSION_ID @tab string
@item scheme @tab CURLINFO_SCHEME @tab string
@item size-download-t @tab CURLINFO_SIZE_DOWNLOAD_T @tab integer
@item size-upload-t @tab CURLINFO_SIZE_UPLOAD_T @tab integer
@item speed-download-t @tab CURLINFO_SPEED_DOWNLOAD_T @tab integer microseconds
@item speed-upload-t @tab CURLINFO_SPEED_UPLOAD_T @tab integer microseconds
@item ssl-engines @tab CURLINFO_SSL_ENGINES @tab list of strings
@item ssl-verifyresult @tab CURLINFO_SSL_VERIFYRESULT @tab integer
@item starttransfer-time @tab CURLINFO_STARTTRANSFER_TIME @tab real seconds
@item starttransfer-time-t @tab CURLINFO_STARTTRANSFER_TIME_T @tab integer microseconds
@c tls-ssl-ptr
@item total-time @tab CURLINFO_TOTAL_TIME @tab real seconds
@item total-time-t @tab CURLINFO_TOTAL_TIME_T @tab integer microseconds
@item used-proxy @tab CURLINFO_USED_PROXY @tab integer form of boolean
@item xfer-id @tab CURLINFO_XFER_ID @tab integer ID
@end multitable

@node Options for setopt, Error Codes, Procedures, Reference
@section Options for setopt

The options that can be set by @code{curl-easy-setopt} are listed in
this section.  For a much better an explanation of what each of these
options does, you can look at the manual page for C library function
@code{curl_easy_setopt} which comes with the libcurl library, which
you should have since it is required to compile this package.

@menu
* Option Table::
* Option Data Types::
@end menu

@node Option Table, Option Data Types, Options for setopt, Options for setopt
@subsection Option Table

The table describes the options and the type of info expected for each
option.

@itemize @bullet

@item
The first column is the symbol that you would pass as the
@code{option} argument to @code{curl-easy-setopt}.

@item
The second column is the name of the option as it is listed in the
manual page for the C library function @code{curl_easy_setopt}.

@item
The third column is the type of data that you would pass as the
@code{info} argument to @code{curl-easy-setopt}.  These may differ
from those in the manual page for C library function
@code{curl_easy_setopt}.  @xref{Option Data Types}, for more about
these types.
@end itemize

@multitable @columnfractions .25 .55 .25
@headitem Option Symbol @tab C Library Name @tab Info Type

@item BEHAVIOR OPTIONS
@item verbose @tab CURLOPT_VERBOSE @tab boolean
@item header @tab CURLOPT_HEADER @tab boolean
@c CURLOPT_NOPROGRESS is deprecated
@item nosignal @tab CURLOPT_NOSIGNAL @tab boolean
@item wildcardmatch @tab CURLOPT_WILDCARDMATCH @tab boolean

@item CALLBACK OPTIONS
@item readdata @tab CURLOPT_READDATA @tab input port

@item NETWORK OPTIONS
@item url @tab CURLOPT_URL @tab string
@item path-as-is @tab CURLOPT_PATH_AS_IS @tab boolean
@item protocols @tab CURLOPT_PROTOCOLS @tab
integer@footnote{@xref{Integer Constants for protocols}.}
@item redir-protocols @tab CURLOPT_REDIR_PROTOCOLS @tab integer@footnote{@xref{Integer Constants for protocols}.}
@item default-protocol @tab CURLOPT_DEFAULT_PROTOCOL @tab string
@item proxy @tab CURLOPT_PROXY @tab string
@item pre-proxy @tab CURLOPT_PRE_PROXY @tab string
@item proxyport @tab CURLOPT_PROXYPORT @tab integer
@item proxytype @tab CURLOPT_PROXYTYPE @tab
integer@footnote{@xref{Integer Constants for proxytype}.}
@item noproxy @tab CURLOPT_NOPROXY @tab string
@item httpproxytunnel @tab CURLOPT_HTTPPROXYTUNNEL @tab boolean
@item connect-to @tab CURLOPT_CONNECT_TO @tab slist
@item socks5-auth @tab CURLOPT_SOCKS5_AUTH @tab integer
@item socks5-gssapi-service @tab CURLOPT_SOCKS5_GSSAPI_SERVICE @tab string
@item socks5-gssapi-nec @tab CURLOPT_SOCKS5_GSSAPI_NEC @tab boolean
@item proxy-service-name @tab CURLOPT_PROXY_SERVICE_NAME @tab string
@item haproxyprotocol @tab CURLOPT_HAPROXYPROTOCOL @tab boolean
@item service-name @tab CURLOPT_SERVICE_NAME @tab string
@item interface @tab CURLOPT_INTERFACE @tab string
@item localport @tab CURLOPT_LOCALPORT @tab integer
@item localportrange @tab CURLOPT_LOCALPORTRANGE @tab integer
@item dns-cache-timeout @tab CURLOPT_DNS_CACHE_TIMEOUT @tab integer
@item doh-url @tab CURLOPT_DOH_URL @tab string
@item buffersize @tab CURLOPT_BUFFERSIZE @tab integer
@item port @tab CURLOPT_PORT @tab integer
@item tcp-fastopen @tab CURLOPT_TCP_FASTOPEN @tab boolean
@item tcp-nodelay @tab CURLOPT_TCP_NODELAY @tab boolean
@item address-scope @tab CURLOPT_ADDRESS_SCOPE @tab integer
@item tcp-keepalive @tab CURLOPT_TCP_KEEPALIVE @tab boolean
@item tcp-keepidle @tab CURLOPT_TCP_KEEPIDLE @tab integer
@item tcp-keepintvl @tab CURLOPT_TCP_KEEPINTVL @tab integer
@item unix-socket-path @tab CURLOPT_UNIX_SOCKET_PATH @tab string
@item abstract-unix-socket @tab CURLOPT_ABSTRACT_UNIX_SOCKET @tab string

@item NAMES AND PASSWORD OPTIONS
@item netrc @tab CURLOPT_NETRC @tab integer@footnote{@xref{Integer
Constants for netrc}.}
@item netrc-file @tab CURLOPT_NETRC_FILE @tab string
@item userpwd @tab CURLOPT_USERPWD @tab string
@item proxyuserpwd @tab CURLOPT_PROXYUSERPWD @tab string
@item username @tab CURLOPT_USERNAME @tab string
@item password @tab CURLOPT_PASSWORD @tab string
@item login-options @tab CURLOPT_LOGIN_OPTIONS @tab string
@item proxyusername @tab CURLOPT_PROXYUSERNAME @tab string
@item proxypassword @tab CURLOPT_PROXYPASSWORD @tab string
@item httpauth @tab CURLOPT_HTTPAUTH @tab
integer@footnote{@xref{Integer Constants for httpauth}.}
@item tlsauth-username @tab CURLOPT_TLSAUTH_USERNAME @tab string
@item tlsauth-type @tab CURLOPT_TLSAUTH_TYPE @tab string
@item proxy-tlsauth-username @tab CURLOPT_PROXY_TLSAUTH_USERNAME @tab string
@item tlsauth-password @tab CURLOPT_TLSAUTH_PASSWORD @tab string
@item proxy-tlsauth-password @tab CURLOPT_PROXY_TLSAUTH_PASSWORD @tab string
@item tlsauth-type @tab CURLOPT_TLSAUTH_TYPE @tab string
@item proxy-tlsauth-type @tab CURLOPT_PROXY_TLSAUTH_TYPE @tab string
@item proxyauth @tab CURLOPT_PROXYAUTH @tab integer@footnote{@xref{Integer Constants for httpauth}.}
@item sasl-ir @tab CURLOPT_SASL_IR @tab boolean
@item xoauth2-bearer @tab CURLOPT_XOAUTH2_BEARER @tab string
@item disallow-username-in-url @tab CURLOPT_DISALLOW_USERNAME_IN_URL @tab boolean

@item HTTP OPTIONS
@item autoreferer @tab CURLOPT_AUTOREFERER @tab boolean
@item accept-encoding @tab CURLOPT_ACCEPT_ENCODING @tab string
@item transfer-encoding @tab CURLOPT_TRANSFER_ENCODING @tab string
@item followlocation @tab CURLOPT_FOLLOWLOCATION @tab boolean
@item unrestricted-auth @tab CURLOPT_UNRESTRICTED_AUTH @tab boolean
@item maxredirs @tab CURLOPT_MAXREDIRS @tab integer
@item postredir @tab CURLOPT_POSTREDIR @tab
integer@footnote{@xref{Integer Constants for postredir}.}
@item put @tab CURLOPT_PUT @tab boolean
@item post @tab CURLOPT_POST @tab boolean
@item postfields@footnote{@xref{Postfields}.} @tab CURLOPT_POSTFIELDS @tab bytevector
@c @item postfieldsize @tab CURLOPT_POSTFIELDSIZE @tab integer
@c @item postfieldsize-large @tab CURLOPT_POSTFIELDSIZE_LARGE @tab biginteger
@c @item copypostfields @tab CURLOPT_COPYPOSTFIELDS @tab bytevector
@item httppost @tab CURLOPT_HTTPPOST @tab httppost
@item referer @tab CURLOPT_REFERER @tab string
@item useragent @tab CURLOPT_USERAGENT @tab string
@item httpheader @tab CURLOPT_HTTPHEADER @tab
slist@footnote{Pass an empty list to clear out the HTTP headers.}
@item headeropt @tab CURLOPT_HEADEROPT @tab integer
@item proxyheader @tab CURLOPT_PROXYHEADER @tab slist
@item http200aliases @tab CURLOPT_HTTP200ALIASES @tab slist
@item cookie @tab CURLOPT_COOKIE @tab string
@item cookiefile @tab CURLOPT_COOKIEFILE @tab string
@item cookiejar @tab CURLOPT_COOKIEJAR @tab string
@item cookiesession @tab CURLOPT_COOKIESESSION @tab boolean
@item cookielist @tab CURLOPT_COOKIELIST @tab string
@item httpget @tab CURLOPT_HTTPGET @tab boolean
@item request-target @tab CURLOPT_REQUEST_TARGET @tab string
@item http-version @tab CURLOPT_HTTP_VERSION @tab
integer@footnote{@xref{Integer Constants for http-version}.}
@item http09-allowed @tab CURLOPT_HTTP09_ALLOWED @tab boolean
@item ignore-content-length @tab CURLOPT_IGNORE_CONTENT_LENGTH @tab boolean
@item http-content-decoding @tab CURLOPT_HTTP_CONTENT_DECODING @tab boolean
@item http-transfer-decoding @tab CURLOPT_HTTP_TRANSFER_DECODING @tab boolean
@item expect-100-timeout-ms @tab CURLOPT_EXPECT_100_TIMEOUT_MS @tab integer
@item pipewait @tab CURLOPT_PIPEWAIT @tab boolean
@item stream-wait @tab CURLOPT_STREAM_WEIGHT @tab integer

@item SMTP OPTIONS
@item mail-from @tab CURLOPT_MAIL_FROM @tab string
@item mail-rcpt @tab CURLOPT_MAIL_RCPT @tab slist
@item mail-auth @tab CURLOPT_MAIL_AUTH @tab string

@item TFTP OPTIONS
@item tftp-blksize @tab CURLOPT_TFTP_BLKSIZE @tab integer
@item tftp-no-options @tab CURLOPT_TFTP_NO_OPTIONS @tab boolean

@item FTP OPTIONS
@item ftpport @tab CURLOPT_FTPPORT @tab string
@item quote @tab CURLOPT_QUOTE @tab slist
@item postquote @tab CURLOPT_POSTQUOTE @tab slist
@item prequote @tab CURLOPT_PREQUOTE @tab slist
@c @item dirlistonly, @tab CURLOPT_DIRLISTONLY @tab boolean
@item append @tab CURLOPT_APPEND @tab boolean
@item ftp-use-eprt @tab CURLOPT_FTP_USE_EPRT @tab boolean
@item ftp-use-epsv @tab CURLOPT_FTP_USE_EPSV @tab boolean
@item ftp-use-pret @tab CURLOPT_FTP_USE_PRET @tab boolean
@item ftp-create-missing-dirs @tab CURLOPT_FTP_CREATE_MISSING_DIRS @tab boolean
@item ftp-response-timeout @tab CURLOPT_FTP_RESPONSE_TIMEOUT @tab integer
@item ftp-alternative-to-user @tab CURLOPT_FTP_ALTERNATIVE_TO_USER @tab string
@item ftp-skip-pasv-ip @tab CURLOPT_FTP_SKIP_PASV_IP @tab boolean
@item ftpsslauth @tab CURLOPT_FTPSSLAUTH @tab
integer@footnote{@xref{Integer Constants for ftpsslauth}.}
@item ftp-ssl-ccc @tab CURLOPT_FTP_SSL_CCC @tab integer@footnote{@xref{Integer Constants for ftp-ssl-ccc}.}
@item ftp-account @tab CURLOPT_FTP_ACCOUNT @tab string
@item ftp-filemethod @tab CURLOPT_FTP_FILEMETHOD @tab integer@footnote{@xref{Integer Constants for ftp-filemethod}.}

@item RTSP OPTIONS
@item rtsp-request @tab CURLOPT_RTSP_REQUEST @tab integer@footnote{@xref{Integer Constants for rtsp-request}.}
@item rtsp-session-id @tab CURLOPT_RTSP_SESSION_ID @tab string
@item rtsp-stream-uri @tab CURLOPT_RTSP_STREAM_URI @tab string
@item rtsp-transport @tab CURLOPT_RTSP_TRANSPORT @tab string
@c rtsp-header is unimplemented
@item rtsp-client-cseq @tab CURLOPT_RTSP_CLIENT_CSEQ @tab integer
@c rtsp-server-cseq is unimplemented

@item PROTOCOL OPTIONS
@item transfertext @tab CURLOPT_TRANSFERTEXT @tab boolean
@item proxy-transfer-mode @tab CURLOPT_PROXY_TRANSFER_MODE @tab boolean
@item crlf @tab CURLOPT_CRLF @tab boolean
@item range @tab CURLOPT_RANGE @tab string
@item resume-from @tab CURLOPT_RESUME_FROM @tab integer
@item resume-from-large @tab CURLOPT_RESUME_FROM_LARGE @tab biginteger
@item customrequest @tab CURLOPT_CUSTOMREQUEST @tab string
@item filetime @tab CURLOPT_FILETIME @tab boolean
@item nobody @tab CURLOPT_NOBODY @tab boolean
@item infilesize @tab CURLOPT_INFILESIZE @tab integer
@item infilesize-large @tab CURLOPT_INFILESIZE_LARGE @tab biginteger
@item upload @tab CURLOPT_UPLOAD @tab boolean
@item upload-buffersize @tab CURLOPT_UPLOAD_BUFFERSIZE @tab integer
@item maxfilesize @tab CURLOPT_MAXFILESIZE @tab integer
@item maxfilesize-large @tab CURLOPT_MAXFILESIZE_LARGE @tab biginteger
@item timecondition @tab CURLOPT_TIMECONDITION @tab integer
@item timevalue @tab CURLOPT_TIMEVALUE @tab integer
@item timevalue-large @tab CURLOPT_TIMEVALUE_LARGE @tab biginteger

@item CONNECTION OPTIONS
@item timeout @tab CURLOPT_TIMEOUT @tab integer
@item timeout-ms @tab CURLOPT_TIMEOUT_MS @tab integer
@item low-speed-limit @tab CURLOPT_LOW_SPEED_LIMIT @tab integer
@item low-speed-time @tab CURLOPT_LOW_SPEED_TIME @tab integer
@item max-send-speed-large @tab CURLOPT_MAX_SEND_SPEED_LARGE @tab biginteger
@item max-recv-speed-large @tab CURLOPT_MAX_RECV_SPEED_LARGE @tab biginteger
@item maxconnects @tab CURLOPT_MAXCONNECTS @tab integer
@c closepolicy is obsolete
@item fresh-connect @tab CURLOPT_FRESH_CONNECT @tab boolean
@item forbid-reuse @tab CURLOPT_FORBID_REUSE @tab boolean
@item connecttimeout @tab CURLOPT_CONNECTTIMEOUT @tab integer
@item connecttimeout-ms @tab CURLOPT_CONNECTTIMEOUT_MS @tab integer
@item ipresolve @tab CURLOPT_IPRESOLVE @tab integer@footnote{@xref{Integer Constants for ipresolve}.}
@item connect-only @tab CURLOPT_CONNECT_ONLY @tab boolean
@item use-ssl @tab CURLOPT_USE_SSL @tab integer@footnote{@xref{Integer Constants for use-ssl}.}
@item resolve @tab CURLOPT_RESOLVE @tab slist
@item dns-interface @tab CURLOPT_DNS_INTERFACE @tab string
@item dns-local-ip4 @tab CURLOPT_DNS_LOCAL_IP4 @tab string
@item dns-local-ip6 @tab CURLOPT_DNS_LOCAL_IP6 @tab string
@item dns-servers @tab CURLOPT_DNS_SERVERS @tab string
@item dns-shuffle-addresses @tab CURLOPT_DNS_SHUFFLE_ADDRESSES @tab boolean
@item accepttimeout-ms @tab CURLOPT_ACCEPTTIMEOUT_MS @tab integer
@item happy-eyeballs-timeout-ms @tab CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS @tab integer
@item upkeep-interval-ms @tab CURLOPT_UPKEEP_INTERVAL_MS @tab integer)

@item SSL AND SECURITY OPTIONS
@item sslcert @tab CURLOPT_SSLCERT @tab string
@item proxy-sslcert @tab CURLOPT_PROXY_SSLCERT @tab string
@item sslcerttype @tab CURLOPT_SSLCERTTYPE @tab string
@item proxy-sslcerttype @tab CURLOPT_PROXY_SSLCERTTYPE @tab string
@item sslkey @tab CURLOPT_SSLKEY @tab string
@item proxy-sslkey @tab CURLOPT_PROXY_SSLKEY @tab string
@item sslkeytype @tab CURLOPT_SSLKEYTYPE @tab string
@item proxy-sslkeytype @tab CURLOPT_PROXY_SSLKEYTYPE @tab string
@item keypasswd @tab CURLOPT_KEYPASSWD @tab string
@item proxy-keypasswd @tab CURLOPT_PROXY_KEYPASSWD @tab string
@item ssl-enable-alpn @tab CURLOPT_SSL_ENABLE_ALPN @tab boolean
@item ssl-enable-npn @tab CURLOPT_SSL_ENABLE_ALPN @tab boolean
@item sslengine @tab CURLOPT_SSLENGINE @tab string
@item sslengine-default @tab CURLOPT_SSLENGINE_DEFAULT @tab boolean
@item ssl-falsestart @tab CURLOPT_SSL_FALSESTART @tab boolean
@item sslversion @tab CURLOPT_SSLVERSION @tab integer@footnote{@xref{Integer Constants for sslversion}.}
@item proxy-sslversion @tab CURLOPT_PROXY_SSLVERSION @tab integer@footnote{@xref{Integer Constants for sslversion}.}
@item ssl-verifyhost @tab CURLOPT_SSL_VERIFYHOST @tab boolean
@item proxy-ssl-verifyhost @tab CURLOPT_SSL_VERIFYHOST @tab boolean
@item ssl-verifypeer @tab CURLOPT_SSL_VERIFYPEER @tab boolean
@item proxy-ssl-verifypeer @tab CURLOPT_PROXY_SSL_VERIFYPEER @tab boolean
@item cainfo @tab CURLOPT_CAINFO @tab string
@item proxy-cainfo @tab CURLOPT_PROXY_CAINFO @tab string
@item issuercert @tab CURLOPT_ISSUERCERT @tab string
@item capath @tab CURLOPT_CAPATH @tab string
@item proxy-capath @tab CURLOPT_PROXY_CAPATH @tab string
@item crlfile @tab CURLOPT_CRLFILE @tab string
@item ssl-verifyhost @tab CURLOPT_SSL_VERIFYHOST @tab integer
@item certinfo @tab CURLOPT_CERTINFO @tab boolean
@item random-file @tab CURLOPT_RANDOM_FILE @tab string
@item egdsocket @tab CURLOPT_EGDSOCKET @tab string
@item ssl-cipher-list @tab CURLOPT_SSL_CIPHER_LIST @tab string
@item ssl-sessionid-cache @tab CURLOPT_SSL_SESSIONID_CACHE @tab boolean
@item krblevel @tab CURLOPT_KRBLEVEL @tab string
@item gssapi-delegation @tab CURLOPT_GSSAPI_DELEGATION @tab integer@footnote{@xref{Integer Constants for gssapi-delegation}.}

@item SSH OPTIONS
@item ssh-auth-types @tab CURLOPT_SSH_AUTH_TYPES @tab integer@footnote{@xref{Integer Constants for ssh-auth-types}.}
@item ssh-host-public-key-md5 @tab
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 @tab string
@item ssh-public-keyfile @tab CURLOPT_SSH_PUBLIC_KEYFILE @tab string
@item ssh-private-keyfile @tab CURLOPT_SSH_PRIVATE_KEYFILE @tab string
@item ssh-known-hosts @tab CURLOPT_SSH_KNOWN_HOSTS @tab string
@c ssh-keyfunction is unimplemented
@c ssh-keydata is unimplemented
@c private is unimplemented
@c share is unimplemented
@item new-file-perms @tab CURLOPT_NEW_FILE_PERMS @tab integer
@item new-directory-perms @tab CURLOPT_NEW_DIRECTORY_PERMS @tab integer
@item telnetoptions @tab CURLOPT_TELNETOPTIONS @tab slist
@end multitable

@node Option Data Types,  , Option Table, Options for setopt
@subsection Option Data Types
In the options table there are several possible types listed for the
option info argument:
@table @code
@item boolean
@code{#t} or @code{#f}
@item integer
A @code{long} integer.  Note that many options have named
integer-valued constants defined.

@item biginteger
An integer that is possibly longer than a @code{long} integer.

@item string
A string.  The scheme string is converted to a C string encoded in the
current locale.

@item bytevector
Either a bytevector or a string that only
contains the Unicode code points U+0000 through U+00FF.

@item slist
A list containing zero or more strings. The scheme string is converted
to a C string encoded in the current locale.

@item httppost
A list containing data that will be used for an HTTP Post operation.
Obviously, this is only for handles for which the @code{url} option is
set to an HTTP URL that will accept a Post operation.

The @var{httppost} data is a list of one or more HTTP Post elements.
The HTTP Post elements will be passed to the server in the order in
which they appear in the list.

Each HTTP Post element it itself a list.  The list has two required
and two optional arguments.

@enumerate
@item Name of the element [required @code{string}]
@item Contents of the element [required @code{bytevector}]
@item The mime type for this element [optional @code{string}]
@item The filename of this element [optional @code{string}]
@end enumerate

The @code{string} and @code{bytevector} types are as described above.

@quotation important
The format of this data structure will change in the next version
@end quotation

@end table

@menu
* Postfields::
* Integer Constants for protocols::
* Integer Constants for proxytype::
* Integer Constants for netrc::
* Integer Constants for httpauth::
* Integer Constants for postredir::
* Integer Constants for http-version::
* Integer Constants for ftpsslauth::
* Integer Constants for ftp-ssl-ccc::
* Integer Constants for ftp-filemethod::
* Integer Constants for rtsp-request::
* Integer Constants for sslversion::
* Integer Constants for ipresolve::
* Integer Constants for use-ssl::
* Integer Constants for gssapi-delegation::
* Integer Constants for ssh-auth-types::
@end menu

@node Postfields, Integer Constants for protocols, Option Data Types, Option Data Types
@subsubsection Postfields

The @code{postfields} option is treated somewhat different than with
the C API.  In the C API, to make postfields, one must pass a
@code{CURLOPT_POSTFIELDSIZE} option along with the
@code{CURLOPT_POSTFIELDS}.  In this Scheme API, the
@code{CURLOPT_POSTFIELDSIZE} is calculated automatically from the bytevector
used the @code{postfields} option.

Also, in this API, the postfields data is always copied from the
source.  There is no need to hold on to the bytevector passed to the
@code{postfields} option.

@node Integer Constants for protocols, Integer Constants for proxytype, Postfields, Option Data Types
@subsubsection Integer Constants for protocols
The following list of integer constants can be used for the
@code{protocols} and @code{redir-protocols} options.

@flushleft
  CURLPROTO_ALL,
  CURLPROTO_DICT,
  CURLPROTO_FILE,
  CURLPROTO_FTP,
  CURLPROTO_FTPS,
  CURLPROTO_GOPHER,
  CURLPROTO_HTTP,
  CURLPROTO_HTTPS,
  CURLPROTO_IMAP,
  CURLPROTO_IMAPS,
  CURLPROTO_LDAP,
  CURLPROTO_LDAPS,
  CURLPROTO_POP3,
  CURLPROTO_POP3S,
  CURLPROTO_RTMP,
  CURLPROTO_RTMPE,
  CURLPROTO_RTMPS,
  CURLPROTO_RTMPT,
  CURLPROTO_RTMPTE,
  CURLPROTO_RTMPTS,
  CURLPROTO_RTSP,
  CURLPROTO_SCP,
  CURLPROTO_SFTP,
  CURLPROTO_SMB,
  CURLPROTO_SMBS,
  CURLPROTO_SMTP,
  CURLPROTO_SMTPS,
  CURLPROTO_TELNET,
  CURLPROTO_TFTP
@end flushleft

@node Integer Constants for proxytype, Integer Constants for netrc, Integer Constants for protocols, Option Data Types
@subsubsection Integer Constants for proxytype
The following list of integer constants can be used for the
@code{proxytype} option.

@flushleft
CURLPROXY_HTTP,
CURLPROXY_HTTPS,
CURLPROXY_HTTP_1_0,
CURLPROXY_SOCKS4,
CURLPROXY_SOCKS4A,
CURLPROXY_SOCKS5,
CURLPROXY_SOCKS5_HOSTNAME
@end flushleft

@node Integer Constants for netrc, Integer Constants for httpauth, Integer Constants for proxytype, Option Data Types
@subsubsection Integer Constants for netrc
The following list of integer constants can be used for the
@code{netrc} option.

@flushleft
CURL_NETRC_OPTIONAL,
CURL_NETRC_IGNORED,
CURL_NETRC_REQUIRED
@end flushleft

@node Integer Constants for httpauth, Integer Constants for postredir, Integer Constants for netrc, Option Data Types
@subsubsection Integer Constants for httpauth
The following list of integer constants can be used with the
@code{httpauth} and @code{proxyauth} options.

@flushleft
CURLAUTH_BASIC,
CURLAUTH_DIGEST,
CURLAUTH_DIGEST_IE,
CURLAUTH_BEARER,
CURLAUTH_NEGOTIATE,
CURLAUTH_NTLM,
CURLAUTH_NTLM_WB,
CURLAUTH_ANY,
CURLAUTH_ANYSAFE,
CURLAUTH_ONLY
@end flushleft

@node Integer Constants for postredir, Integer Constants for http-version, Integer Constants for httpauth, Option Data Types
@subsubsection Integer Constants for postredir
The following list integer constants can be used with the
@code{postredir} option.

@flushleft
CURL_REDIR_POST_301,
CURL_REDIR_POST_302,
CURL_REDIR_POST_ALL
@end flushleft

@node Integer Constants for http-version, Integer Constants for ftpsslauth, Integer Constants for postredir, Option Data Types
@subsubsection Integer Constants for http-version
The following list integer constants can be used with the
@code{http-version} option.

@flushleft
CURL_HTTP_VERSION_NONE,
CURL_HTTP_VERSION_1_0,
CURL_HTTP_VERSION_1_1,
CURL_HTTP_VERSION_2_0,
CURL_HTTP_VERSION_2TLS,
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
@end flushleft

@node Integer Constants for ftpsslauth, Integer Constants for ftp-ssl-ccc, Integer Constants for http-version, Option Data Types
@subsubsection Integer Constants for ftpsslauth
The following list integer constants can be used with the
@code{ftpsslauth} option.

@flushleft
CURLFTPAUTH_DEFAULT,
CURLFTPAUTH_SSL,
CURLFTPAUTH_TLS
@end flushleft

@node Integer Constants for ftp-ssl-ccc, Integer Constants for ftp-filemethod, Integer Constants for ftpsslauth, Option Data Types
@subsubsection Integer Constants for ftp-ssl-ccc
The following list integer constants can be used with the
@code{ftp-ssl-ccc} option.

@flushleft
CURLFTPSSL_CCC_NONE,
CURLFTPSSL_CCC_PASSIVE,
CURLFTPSSL_CCC_ACTIVE
@end flushleft

@node Integer Constants for ftp-filemethod, Integer Constants for rtsp-request, Integer Constants for ftp-ssl-ccc, Option Data Types
@subsubsection Integer Constants for ftp-filemethod
The following list integer constants can be used with the
@code{ftp-filemethod} option.

@flushleft
CURLFTPMETHOD_MULTICWD,
CURLFTPMETHOD_NOCWD,
CURLFTPMETHOD_SINGLECWD
@end flushleft

@node Integer Constants for rtsp-request, Integer Constants for sslversion, Integer Constants for ftp-filemethod, Option Data Types
@subsubsection Integer Constants for rtsp-request
The following list integer constants can be used with the
@code{rtsp-request} option.

@flushleft
  CURL_RTSPREQ_OPTIONS,
  CURL_RTSPREQ_DESCRIBE,
  CURL_RTSPREQ_ANNOUNCE,
  CURL_RTSPREQ_SETUP,
  CURL_RTSPREQ_PLAY,
  CURL_RTSPREQ_PAUSE,
  CURL_RTSPREQ_TEARDOWN,
  CURL_RTSPREQ_GET_PARAMETER,
  CURL_RTSPREQ_SET_PARAMETER,
  CURL_RTSPREQ_RECORD,
  CURL_RTSPREQ_RECEIVE
@end flushleft

@node Integer Constants for sslversion, Integer Constants for ipresolve, Integer Constants for rtsp-request, Option Data Types
@subsubsection Integer Constants for sslversion
The following list integer constants can be used with the
@code{sslversion} option.

@flushleft
CURL_SSLVERSION_DEFAULT,
CURL_SSLVERSION_TLSv1,
CURL_SSLVERSION_TLSv1_0,
CURL_SSLVERSION_TLSv1_1,
CURL_SSLVERSION_TLSv1_2,
CURL_SSLVERSION_TLSv1_3,
CURL_SSLVERSION_MAX_DEFAULT,
CURL_SSLVERSION_MAX_TLSv1_0,
CURL_SSLVERSION_MAX_TLSv1_1,
CURL_SSLVERSION_MAX_TLSv1_2,
CURL_SSLVERSION_MAX_TLSv1_3,
CURL_SSLVERSION_SSLv2,
CURL_SSLVERSION_SSLv3,
@end flushleft

@node Integer Constants for ipresolve, Integer Constants for use-ssl, Integer Constants for sslversion, Option Data Types
@subsubsection Integer Constants for ipresolve
The following list integer constants can be used with the
@code{ipresolve} option.

@flushleft
CURL_IPRESOLVE_WHATEVER,
CURL_IPRESOLVE_V4,
CURL_IPRESOLVE_V6
@end flushleft

@node Integer Constants for use-ssl, Integer Constants for gssapi-delegation, Integer Constants for ipresolve, Option Data Types
@subsubsection Integer Constants for use-ssl
The following list integer constants can be used with the
@code{use-ssl} option.

@flushleft
CURLUSESSL_NONE,
CURLUSESSL_TRY,
CURLUSESSL_CONTROL,
CURLUSESSL_ALL
@end flushleft

@node Integer Constants for gssapi-delegation, Integer Constants for ssh-auth-types, Integer Constants for use-ssl, Option Data Types
@subsubsection Integer Constants for gssapi-delegation
The following list integer constants can be used with the
@code{gssapi-delegation} option.

@flushleft
CURLGSSAPI_DELEGATION_FLAG,
CURLGSSAPI_DELEGATION_POLICY_FLAG
@end flushleft

@node Integer Constants for ssh-auth-types,  , Integer Constants for gssapi-delegation, Option Data Types
@subsubsection Integer Constants for ssh-auth-types
The following list integer constants can be used with the
@code{ssh-auth-types} option.

@flushleft
CURLSSH_AUTH_PUBLICKEY,
CURLSSH_AUTH_PASSWORD,
CURLSSH_AUTH_HOST,
CURLSSH_AUTH_KEYBOARD,
CURHSSH_AUTH_ANY
@end flushleft

@node Error Codes,  , Options for setopt, Reference
@section Error Codes
There is a set of named integer-value constants for the error codes.
@table @code
@item     CURLE_OK
@item     CURLE_UNSUPPORTED_PROTOCOL
@item     CURLE_FAILED_INIT
@item     CURLE_URL_MALFORMAT
@item     CURLE_NOT_BUILT_IN
@item     CURLE_COULDNT_RESOLVE_PROXY
@item     CURLE_COULDNT_RESOLVE_HOST
@item     CURLE_COULDNT_CONNECT
@item     CURLE_FTP_WEIRD_SERVER_REPLY
@item     CURLE_REMOTE_ACCESS_DENIED
@item     CURLE_FTP_ACCEPT_FAILED
@item     CURLE_FTP_WEIRD_PASS_REPLY
@item     CURLE_FTP_ACCEPT_TIMEOUT
@item     CURLE_FTP_WEIRD_PASV_REPLY
@item     CURLE_FTP_WEIRD_227_FORMAT
@item     CURLE_FTP_CANT_GET_HOST
@item     CURLE_HTTP2
@item     CURLE_FTP_COULDNT_SET_TYPE
@item     CURLE_PARTIAL_FILE
@item     CURLE_FTP_COULDNT_RETR_FILE
@item     CURLE_FTP_QUOTE_ERROR
@item     CURLE_HTTP_RETURNED_ERROR
@item     CURLE_WRITE_ERROR
@item     CURLE_UPLOAD_FAILED
@item     CURLE_READ_ERROR
@item     CURLE_OUT_OF_MEMORY
@item     CURLE_OPERATION_TIMEDOUT
@item     CURLE_FTP_PORT_FAILED
@item     CURLE_FTP_COULDNT_USE_REST
@end table

.

@table @code
@item     CURLE_RANGE_ERROR
@item     CURLE_HTTP_POST_ERROR
@item     CURLE_SSL_CONNECT_ERROR
@item     CURLE_BAD_DOWNLOAD_RESUME
@item     CURLE_FILE_COULDNT_READ_FILE
@item     CURLE_LDAP_CANNOT_BIND
@item     CURLE_LDAP_SEARCH_FAILED
@item     CURLE_FUNCTION_NOT_FOUND
@item     CURLE_ABORTED_BY_CALLBACK
@item     CURLE_BAD_FUNCTION_ARGUMENT
@item     CURLE_INTERFACE_FAILED
@item     CURLE_TOO_MANY_REDIRECTS
@item     CURLE_UNKNOWN_OPTION
@item     CURLE_TELNET_OPTION_SYNTAX
@item     CURLE_GOT_NOTHING
@item     CURLE_SSL_ENGINE_NOTFOUND
@item     CURLE_SSL_ENGINE_SETFAILED
@item     CURLE_SEND_ERROR
@item     CURLE_RECV_ERROR
@item     CURLE_SSL_CERTPROBLEM
@item     CURLE_SSL_CIPHER
@item     CURLE_PEER_FAILED_VERIFICATION
@item     CURLE_BAD_CONTENT_ENCODING
@item     CURLE_LDAP_INVALID_URL
@item     CURLE_FILESIZE_EXCEEDED
@item     CURLE_USE_SSL_FAILED
@item     CURLE_SEND_FAIL_REWIND
@item     CURLE_SSL_ENGINE_INITFAILED
@item     CURLE_LOGIN_DENIED
@item     CURLE_TFTP_NOTFOUND
@item     CURLE_TFTP_PERM
@item     CURLE_REMOTE_DISK_FULL
@item     CURLE_TFTP_ILLEGAL
@item     CURLE_TFTP_UNKNOWNID
@item     CURLE_REMOTE_FILE_EXISTS
@item     CURLE_TFTP_NOSUCHUSER
@item     CURLE_CONV_FAILED
@item     CURLE_CONV_REQD
@item     CURLE_SSL_CACERT_BADFILE
@item     CURLE_REMOTE_FILE_NOT_FOUND
@item     CURLE_SSH
@item     CURLE_SSL_SHUTDOWN_FAILED
@item     CURLE_AGAIN
@end table

.

@table @code
@item     CURLE_SSL_CRL_BADFILE
@item     CURLE_SSL_ISSUER_ERROR
@item     CURLE_FTP_PRET_FAILED
@item     CURLE_RTSP_CSEQ_ERROR
@item     CURLE_FTP_BAD_FILE_LIST
@item     CURLE_CHUNK_FAILED
@item     CURLE_NO_CONNECTION_AVAILABLE
@item     CURLE_SSL_PINNEDPUBKEYNOTMATCH
@item     CURLE_SSL_INVALIDCERTSTATUS
@item     CURLE_HTTP2_STREAM
@item     CURLE_RECURSIVE_API_CALL
@end table

@node Index,  , Reference, Top
@unnumbered Index
@printindex cp
@bye
