Skip to content

TheiOSDude/SimplyNetworking

Repository files navigation

SimplyNetworking

A lightweight, reusable, Swift Networking library.

### SPM Compatible.

Usage:

let apiClient = SNClient() // Basic Client
let request = try APIRequest(root: "https://theiosdude.api.com", path: "test", method: "GET").urlRequest() // URLRequest
request.addingQueryItem(name: "query", value: "Great Names") //https://theiosdude.api.com/test?query=great%20names
apiClient.request(request) { (result: Result<[PersonName], NetworkLoaderError> ) in
      switch result ...
    }
}

Stubbing

Responses can be stubbed, for unit tests using the URLProtocol subclass provided (MockSNClient). View the SimplyNetworkingTests XCTestCase class for an example

By Lee Burrows @TheiOSDude

About

A lightweight, reusable, Swift Networking library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages