This option effectively pre-populates the DNS cache with entries for the
host+port pair so redirects and everything that operations against the
HOST+PORT will instead use your provided ADDRESS. Addresses set with
-\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary entries.
+\fICURLOPT_RESOLVE(3)\fP will not time-out from the DNS cache like ordinary
+entries.
+
+The provided ADDRESS set by this option will be used even if
+\fICURLOPT_IPRESOLVE(3)\fP is set to make libcurl use another IP version.
Remove names from the DNS cache again, to stop providing these fake resolves,
by including a string in the linked list that uses the format
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
-and port number must exactly match what was already added previously. (Added
-in 7.42.0)
+and port number must exactly match what was already added previously.
.SH DEFAULT
NULL
.SH PROTOCOLS
if(curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
- res = curl_easy_perform(curl);
+
+ curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
-.BR CURLOPT_IPRESOLVE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
+.BR CURLOPT_IPRESOLVE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), " CURLOPT_CONNECT_TO "(3), "