HttpClient using named pipe lazarus / 62-General ---------------------------------------------------------------------- Pascal · 2020-05-20 20:13 Is there a way to use TFPHTTPClient (fphttpclient) with a named pipe? I would like to build a docker client but don't want to build the whole http stuff, which is needed for the rest api, again. The named pipe for docker is \\.\pipe\docker_engine. ---------------------------------------------------------------------- Loesje · 2020-05-25 20:06 Ehm... are you sure that the docker-engine uses HTTP as the protocol when you connect to it using a pipe? Woudn't that be strange? But then again, it could work... ---------------------------------------------------------------------- Pascal · 2020-05-26 07:03 Yes, i am sure! See Develop with Docker Engine API. On Windows the named pipe is the default to communicate to the docker engine. ---------------------------------------------------------------------- Thaddy · 2020-05-26 07:10 Quote from: Pascal on May 26, 2020, 09:03:03 amYes, i am sure! See Develop with Docker Engine API. On Windows the named pipe is the default to communicate to the docker engine. There is no reason that should not work, but plz use https, not http, and install proper certificates. ---------------------------------------------------------------------- PascalDragon · 2020-05-26 07:19 I have not tested it, but you'll probably need to implement your own TSocketHandler class that can deal with named pipes. You can use that in the TFPHTTPClient either by overriding GetSocketHandler or by setting OnGetSocketHandler. Please note that from what I've read the named pipe is only accessible if your application is running with elevated privileges, so if you want your application to run as a normal user you must use an ordinary network connection instead. ---------------------------------------------------------------------- Pascal · 2020-05-26 13:45 Quote from: PascalDragon on May 26, 2020, 09:19:56 amI have not tested it, but you'll probably need to implement your own TSocketHandler class that can deal with named pipes. You can use that in the TFPHTTPClient either by overriding GetSocketHandler or by setting OnGetSocketHandler. Thanks for the clues. Quote from: PascalDragon on May 26, 2020, 09:19:56 amPlease note that from what I've read the named pipe is only accessible if your application is running with elevated privileges, so if you want your application to run as a normal user you must use an ordinary network connection instead. That's right. Unfortunately, as the docker daemon runs in an hyper-v vm, there is no way to connect to it via network. At least i do not know of one.