delegate
A delegate specific to the task.
Declaration
var delegate: (any URLSessionTaskDelegate)? { get set }Discussion
This task-specific delegate receives messages from the task before the session’s delegate receives them. This is similar to the behavior of the delegate parameter used by the asychronous methods in URLSession like bytes(for:delegate:) and data(for:delegate:).