Classes
The following classes are available globally.
-
Constraint: Constraints are tasks which can hold network requests from starting until they are satisfied.
See moreDeclaration
Swift
open class Constraint
-
The NetworkResponse class contains the Data, URLResponse, Error (if any) and possibly the serialized response for a given resource.
See moreDeclaration
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 moreDeclaration
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 theSwiftyInspecter.shared.presentableInspector()
method.Swifty Inspector only collects and displays information in the
DEBUG
compiler configuration. Only available on iOS 10+.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 moreDeclaration
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 moreDeclaration
Swift
public class NetworkResource : NSObject
-
A subclass of NetworkResource, with support for carrying a request body.
See moreDeclaration
Swift
public class NetworkResourceWithBody : NetworkResource