#URLSession When I run my end-to-end tests from Swift against my localhost Ruby server (Puma, Rails 7), I sometimes get network timeout errors (URLError code -1001). Server looks fine, it's just as if the client does not receive some replies. I never have those errors when I'm connecting to a remote server (nginx+passenger). Does this ring a bell to anyone?

URLSession performance for reading a byte stream

What’s the best way to read a stream of bytes with URLSession? That’s the simple question I set out to answer. I wrote some benchmarks. They read a 128 MiB file and perform a contrived aggregation of its content bytes (a joking “hash” of them, merely to ensure the actual reads aren’t optimised out).

⚠️ In a nutshell, the results here demonstrate the best-case performance for each of the […]

https://wadetregaskis.com/urlsession-performance-for-reading-a-byte-stream/

URLSession performance for reading a byte stream – Wade Tregaskis

I think I have seen enough pain points with plain #URLSession now to appropriately appreciate the comforts of #Alamofire.

I try to keep my dependencies down where I can, but I really don't feel like reinventing retry logic, network error handling and session management.
#iOS #Swift

I've been slowly refactoring my network code to move to a newer backend,, and in the process I moved the client code from using the Moya lib to basic URLSession. Moya has been great and works well, but it's not being updated anymore and has no async/await support. Anyway, as I last night removed the last of the Moya code the logging disappeared! So Moya was doing something to trigger the internal network logging and now it's gone. Logging bliss again!

#ios #moya #urlsession