TIdTCPClient
needs to be told whether to use IPv4 or IPv6 for its socket and hostname-to-IP resolutions. That is done using the TIdTCPClient.IPVersion
property. However, TIdHTTP
is a special case because it manages the TIdTCPClient
properties and connection internally, including the IPVersion
. TIdHTTP
sets the IPVersion
based on the URL being requested. In order to request a URL containing an IPv6 hostname, it needs to be wrapped in brackets, eg:
Result := IdHttp1.Get('http://[www.six.heise.de]/')