The solution here to me sounds simple, just implement UNIX socket support in
the stdlib by supporting URIs like: `unix://localhost/run/podman/podman.sock` :)
Happy to give pointers on how to do that if you want to tackle it.
I guess I will have to gave up on this one for now. Need more time to get used
to the language to tackle this one on my own. But I'm still impressed how fast
it was to build and test all the other parts not related to the socket itself.
Appreciate all the replies on the issue. Thanks All.
.net allows passing a HttpMessageHandler to the HttpClient constructor. The
handler is responsible for sending a request:
[https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpmessagehandler?view=netcore-3.1](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpmessagehandle
Option 1 won't work, it's just a duplicate method and I assume the compiler
will complain.
Option 2 is workable but requires minor changes to the HttpClient class,
because Nim objects don't support dynamic dispatching by default. (In C++
terms, the overriding is non-virtual.) So if you implemen
In Python i was able to override a class method that handler to socket
connection. Bellow is the simplified sample:
from http.client import HTTPConnection # Core Library
class HTTPConnectionUnixSocket(HTTPConnection):
def connect(self):
sock = socket.soc
How do other languages solve this problem?
Goal: Use the _HttpClient_ to communicate with a _ReST API_ through a _UNIX
socket_ provided by a _daemon_.
Details: _Podman_ is providing a brand new _ReST API_ (v2.0) and the _podman
daemon_ creates a _unix socket_ to which we can connect and start talking with
the application using _HTTP_.