Classes

The following classes are available globally.

  • Responsible for creating and managing Request objects, as well as their underlying NSURLSession.

    See more

    Declaration

    Swift

    public class Manager
  • Responsible for sending a request and receiving the response and associated data from the server, as well as managing its underlying NSURLSessionTask.

    See more

    Declaration

    Swift

    public class Request
  • 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.

    See more

    Declaration

    Swift

    public class MultipartFormData
  • 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 more

    Declaration

    Swift

    public class NetworkReachabilityManager