open class LanguageObserver : SAPURLSessionObserving
This observer is responsible to set the Accept-Language headers to each HTTP request of the
To enable this functionality you need to register this observer to an
This is an example for a typical usage of the observer:
let urlSession: SAPURLSession = <#SAPURLSession instance#> let languageObserver = LanguageObserver() urlSession.register(languageObserver)
language for Accept-Language header
public var language: String?
Initializes a new LanguageObserver instance
public init(language: String? = nil)
language for Accept-Language header, by default it is the Locale.current.identifier value
Invoked before a request is sent. An observer can modify the request, or cancel it.
The session which will contain the task after creation.
The task which is about to be created.
The request with which the task will be created.
A completion handler that your delegate method must call.