Hi! How would one perform HTTP requests to a Unix ...
# ktor
d
Hi! How would one perform HTTP requests to a Unix socket instead of a TCP socket? I tried using
unix://
as the schema, but that didn't seem to work. I'm using the CIO client engine
h
d
That is a shame, but thanks for informing me
h
At least for test purposes you could easily checkout my branch.
d
Thanks. I'll probably come up with some other alternative, ie a shim that listens on localhost on whatever port and forwards traffic between the socket and the application itself
Or maybe it's possible to provide CIO with a socket manually? If I build the socket using junixsocket, for example
I'm quite new to Kotlin (and Java), so apologies if I'm missing something too obvious
h
Do you use Kotlin/JVM (Java)? If so, you could use a client engine which supports unix sockets, AFAIK netty support it.
d
Yes, I'm running on the JVM. I used CIO because it seemed to be the suggested one. I'll give Netty a try. Thanks!
Netty does not appear to work for Ktor Client
h
Oh sorry, I mixed it up with Ktor Netty server side engine.
201 Views