Networking
-
A protocol that needs to be conformed to by custom server API requests.
Declaration
Swift
public protocol APIRequestType : AnyObject, CustomStringConvertible, SchedulableTask
-
The executing behavior of the APIRequest.
Declaration
Swift
public enum APIRequestExecutionBehavior
-
A protocol that needs to be conformed to by custom server API request configurations.
Declaration
Swift
public protocol APIRequestConfigurationType : URLConvertible, URLRequestConvertible
-
A closure provided by the type conforming to APIRequestConfigurationType protocol. This will be called by APIRequest with raw URLResponse so the implementer has an opportunity to parse and infer any custom errors if necessary.
Declaration
Swift
public typealias CustomErrorExtractor = (DataResponse<Data>) -> UsherErrorProtocol?
-
API request status.
Declaration
Swift
public enum APIRequestStatus : String, CustomStringConvertible
-
APIRequestExecutor is responsible for scheduling and executing the network requests. It can be used to stop / start all network activity if necessary.
Declaration
Swift
public class APIRequestExecutor
-
Enum representation wrapper for
NSURLAuthenticationMethod
. Only authentication methods supported by APIrequestType are listed.Declaration
Swift
public enum URLAuthenticationMethod : RawRepresentable
-
A protocol for the class that will provide the
URLCredential
for the specified authentication challenge.Declaration
Swift
public protocol URLCredentialProvider
-
A class conforming to the
URLCredentialProvider
protocol. This class is the default credential provider forURLAuthenticationMethod.serverTrust
The purpose of this class is to make certificate pinning easy to setup. All the heavy lifting is done by this class andAPIRequestType
. The caller only needs to call the necessary API to pin a certificate or spki fingerprint for their server.Declaration
Swift
public final class ServerTrustManager