Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CURL.SetOptionNETRCFile

Sets the full path to the netrc file.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionNETRCFile"; curl; Value { ; Encoding } )   More

Parameters

Parameter Description Example Flags
curl The CURL session handle. $curl
Value The file path. $path
Encoding The text encoding for text parameter.
Default is UTF-8.
Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ.
"UTF8" Optional

Result

Returns "OK" on success.

Description

Sets the full path to the netrc file.
Pass a text string containing the full path name to the file you want libcurl to use as .netrc file. If this option is omitted, and CURL.SetOptionNetRC is set, libcurl will attempt to find a .netrc file in the current user's home directory.

Starting with version 8.0 the plugin will always use UTF-8 encoding for file path on Linux and macOS. For macOS we also do the unicode character normalization for file names for you.

See also NETRC_FILE option in CURL manual.

See also

Release notes

Blog Entries

Created 18th August 2014, last changed 12nd December 2017


CURL.SetOptionMimeOptions - CURL.SetOptionNetRC