The following classes are available globally.
An abstract API client.
In order to avoid hitting timeouts at every request when one or more hosts are not working properly (whatever the reason: DNS failure, no route to host, server down…), the client maintains a known status for each host. That status can be either up, down or unknown. Initially, all hosts are in the unknown state. Then a given host’s status is updated whenever a request to it returns a response or an error.
When a host is flagged as down, it will not be considered for subsequent requests. However, to avoid discarding hosts permanently, statuses are only remembered for a given timeframe, indicated bySee more
hostStatusTimeout. (You may adjust it as needed, although the default value
defaultHostStatusTimeoutshould make sense for most applications.)
@objcMembers public class AbstractClient : NSObject
Per-request options. This class allows specifying options at the request level, overriding default options at the
NoteThese are reserved for advanced use cases. In most situations, they shouldn’t be needed.
@objc public class RequestOptions : NSObject, NSCopying