SAPcpmsObserver

public class SAPcpmsObserver : SAPURLSessionObserving

This observer is responsible to set required headers for communication with services exposed by SAPcpms. This includes the X-SMP-APPID and X-SMP-DEVICEID header fields, which are added to each HTTP request of the SAPURLSession.

To enable this functionality you need to register this observer to an SAPURLSession instance.

This is an example for a typical usage of the observer:

let urlSession: SAPURLSession = <#SAPURLSession instance#>
let applicationID: String = <#application_ID#>
let deviceID: String? = <#device_ID#>
let applicationVersion: String? = <#application_Version#>

let observer = SAPcpmsObserver(applicationID: applicationID, deviceID: deviceID, applicationVersion: applicationVersion)
urlSession.register(observer)