I have a use-case where I want to utilize URLSessionDelegate to keep track of the progress of data connections in detail.
The current design of OpenAISwift.swift uses the dataTask(with:completionHandler:) method of URLSession to perform data communication, but this method seems to bypass the various callbacks of URLSessionDelegate to completion handler. (refs)
I tried using OpenAISwift.Config to specify my own URLSession, but in the end I could not get the URLSessionDelegate to work.
It would be nice if there was an interface that could support URLSessionDelegate (or its subprotocols), or an original callback mechanism that could keep track of the progress of data communication in detail.
I have a use-case where I want to utilize URLSessionDelegate to keep track of the progress of data connections in detail.
The current design of
OpenAISwift.swift
uses thedataTask(with:completionHandler:)
method of URLSession to perform data communication, but this method seems to bypass the various callbacks of URLSessionDelegate to completion handler. (refs)I tried using
OpenAISwift.Config
to specify my own URLSession, but in the end I could not get the URLSessionDelegate to work.It would be nice if there was an interface that could support URLSessionDelegate (or its subprotocols), or an original callback mechanism that could keep track of the progress of data communication in detail.