idHTTP and DNS over HTTPS lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- RDL · 2022-11-20 15:02 Hello. I make a DoH request via curl, it works. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i curl -H 'accept: application/dns-message' -k 'https://dns.yandex/dns- query?dns=AAABAAABAAAAAAAABG1haWwCcnUAAAEAAQ' | od -tcu1x1 I'm trying to make the same request through Indy, I get the message Connection Closed Gracefully. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i HTTP:=TIdHT TP.Create;HTTP.HandleRedirects:=True;HTTP.IOHandler:=SSL;HTTP.Request. Accept:='application/dns-message';HTTP.Get('https://dns.yandex/dns-que ry?dns=AAABAAABAAAAAAAABG1haWwCcnUAAAEAAQ',hsResponseStream);HTTP.Free ; What am I doing wrong? ---------------------------------------------------------------------- Bogen85 · 2022-11-20 16:36 Can you please provide a complete able to compile example? ---------------------------------------------------------------------- Thaddy · 2022-11-20 16:49 If curl is installed, simply use libcurl, which is supported as standard. It also works on Windows since 3.0.0. (I provided a patch, FPK commited it) ---------------------------------------------------------------------- RDL · 2022-11-22 07:21 I have attached an example program. To compile, you need to install Indy from this pull request https://github.com/mezen/Indy/tree/NewOpenSSL_PR It is not clear why this request works through curl, but not through indy