CorrelationObserver
open class CorrelationObserver : SAPURLSessionObserving
CorrelationObserver
Generates and adds a unique identifier to the requests of a SAPURLSessionTask.
In case the task will resend the same correlationID will be used.
The correlationID will be logged out to the logs with Logger under the component SAP.Foundation.SAPURLSession.CorrelationObserver‘
The code snippet below demonstrates how to use it:
let correlationObserver = CorrelationObserver()
sapURLSession.register(correlationObserver)
-
initializes a new instance
Declaration
Swift
public init() -
Generates a new correlationID
Declaration
Swift
open func newCorrelationID() -> String
-
SAPURLSessionObserving implementation
Declaration
Swift
open func sapURLSession(_ session: SAPURLSession, task: SAPURLSessionTask, willSend request: URLRequest, completionHandler: @escaping (SAPURLSession.RequestDisposition) -> Void) -
Declaration
Swift
public func copy() -> Any?