Function fetch() over Unix sockets
Supports sending fetch() requests over a Unix socket.
While this not an API that browsers will support, it’s useful for server-side applications that need to communicate with services over a Unix socket, like the Docker daemon.
const response = await fetch("http://localhost/info", {
unix: "/var/run/docker.sock",
});
const { ID } = await response.json();
console.log("Docker ID:", ID); // <uuid>