Specify which ip protocol version to use
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);
Allows an application to select what kind of IP addresses to use when resolving host names. This is only interesting when using host names that resolve addresses using more than one version of IP. The allowed values are:
Default, resolves addresses to all IP versions that your system allows.
Resolve to IPv4 addresses.
Resolve to IPv6 addresses.