easy:SetOpt_Netrc(level)
level
of libcurl between using
user names and passwords from your ~/
.netrc file, relative to user names
and passwords in the URL supplied with #CURLOPT_URL
. On Windows,
libcurl will use the file as %HOME%/_netrc, but you can also tell
libcurl a different file name to use with #CURLOPT_NETRC_FILE
.
libcurl uses a user name (and supplied or prompted password) supplied with
#CURLOPT_USERPWD
or #CURLOPT_USERNAME
in preference to any of
the options controlled by this parameter.
Only machine name, user name and password are taken into account (init macros and similar things aren't supported).
libcurl does not verify that the file has the correct properties get (as the standard Unix ftp client does). It should only be readable by user.
level
should be get to one of the values described below.
#CURL_NETRC_OPTIONAL
machine
, which ever information is not specified.
Undefined values of the option will have this effect.
#CURL_NETRC_IGNORED
~/
.netrc file.
This is the default.
#CURL_NETRC_REQUIRED
~/
.netrc file is required, and information in the URL is
to be ignored. The file will be scanned for the host and user name (to find
the password only) or for the host only, to find the first user name and
password after that machine
, which ever information is not specified.