Architecture

Cauli will hook into the URL Loading System by registering a custom URLProtocol and swizzling the URLSessionConfiguration.default with one, where the protocolClasses contain a custom URLProtocol.

Therefore it’s recommended to create your Cauli instance as soon as possible, preferred in the application:didFinishLaunchingWithOptions: to ensure that all network requests can be intercepted.