Classes

The following classes are available globally.

  • Constraint: Constraints are tasks which can hold network requests from starting until they are satisfied.

    See more

    Declaration

    Swift

    open class Constraint
  • Errors that can occur in the WebService domain

    See more

    Declaration

    Swift

    public class WebServiceError
  • Errors that can occur in the Swifty domain

    See more

    Declaration

    Swift

    public class SwiftyError
  • The NetworkResponse class contains the Data, URLResponse, Error (if any) and possibly the serialized response for a given resource.

    See more

    Declaration

    Swift

    @objc
    public class NetworkResponse : NSObject
  • Swifty: The main entry point to the networking infrastructure. Keeps track of the constraints and interceptors and services the requests with it’s URLSession while taking care of all the attributes of the network resource.

    See more

    Declaration

    Swift

    @objc
    final public class Swifty : NSObject
  • Swifty Inspector is way to view the log of all requests that have gone through Swifty, and view their request and response parameters, including their URLSessionTaskMetrics.

    To show the Swifty Inspector, present the UINavigationController returned from the SwiftyInspecter.shared.presentableInspector() method.

    Swifty Inspector only collects and displays information in the DEBUG compiler configuration. Only available on iOS 10+.

    See more

    Declaration

    Swift

    @available(iOS 10.0, *)
    @objc
    public final class SwiftyInspector : UITableViewController
  • A wrapper over NSMutableURLRequest, only containing a request with the Server URL of the WebService

    Use any of the HTTPMethod modifiers like .get() or .post() to get a NetworkResource from this.

    See more

    Declaration

    Swift

    @objc
    public class BaseResource : NSObject
  • A wrapper over NSMutableURLRequest, it’s an alias for a network request in Swifty.

    It provides the chaining modifier syntax and also stores attributes and directions for Swifty to run the given network request.

    See more

    Declaration

    Swift

    public class NetworkResource : NSObject