TL;DR: Is the SPI-gated _HTTPClient stable enough to use in non-test code?
I have a project that runs a WebSocket client. On Apple platforms I use URLSession for this, but I need to support other platforms too. I know FlyingFox is mainly a server, but it seems to contain the bits & pieces needed to run a WebSocket client, if I use @_spi(Private) import FlyingFox to get access to the _HTTPClient struct (which looks like it was just added to support testing the server code.) But before I go too far I want to check if you think this will work well enough for production code.
(I also noticed that SocketAddress only supports raw addresses, no DNS hostname lookup, but that’s not hard to implement; maybe I’ll submit a PR if I end up going down this road.)
TL;DR: Is the SPI-gated
_HTTPClientstable enough to use in non-test code?I have a project that runs a WebSocket client. On Apple platforms I use URLSession for this, but I need to support other platforms too. I know FlyingFox is mainly a server, but it seems to contain the bits & pieces needed to run a WebSocket client, if I use
@_spi(Private) import FlyingFoxto get access to the_HTTPClientstruct (which looks like it was just added to support testing the server code.) But before I go too far I want to check if you think this will work well enough for production code.(I also noticed that
SocketAddressonly supports raw addresses, no DNS hostname lookup, but that’s not hard to implement; maybe I’ll submit a PR if I end up going down this road.)