Classes
The following classes are available globally.
-
Responsible for handling all delegate callbacks for the underlying session.
See moreDeclaration
Swift
open class SessionDelegate: NSObject
-
Responsible for sending a request and receiving the response and associated data from the server, as well as managing its underlying
See moreURLSessionTask
.Declaration
Swift
open class Request
-
Declaration
Swift
open class UploadRequest: DataRequest
-
Constructs
multipart/form-data
for uploads within an HTTP or HTTPS body. There are currently two ways to encode multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.For more information on
multipart/form-data
in general, please refer to the RFC-2388 and RFC-2045 specs as well and the w3 form documentation.- https://www.ietf.org/rfc/rfc2388.txt
- https://www.ietf.org/rfc/rfc2045.txt
- https://www.w3.org/TR/html401/interact/forms.html#h-17.13
Declaration
Swift
open class MultipartFormData
-
Responsible for managing the mapping of
See moreServerTrustPolicy
objects to a given host.Declaration
Swift
open class ServerTrustPolicyManager
-
The
NetworkReachabilityManager
class listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.Reachability can be used to determine background information about why a network operation failed, or to retry network requests when a connection is established. It should not be used to prevent a user from initiating a network request, as it’s possible that an initial request may be required to establish reachability.
See moreDeclaration
Swift
public class NetworkReachabilityManager
-
The task delegate is responsible for handling all delegate callbacks for the underlying task as well as executing all operations attached to the serial operation queue upon task completion.
See moreDeclaration
Swift
open class TaskDelegate: NSObject