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