Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

alfredcc/Archi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Archi

A demo for networking architecture.

Before:

Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"])
         .responseJSON { response in
              // 1. Validate
              if response.result.isSuccess {
                // 2. Parse JSON data
                let object = JSONParseor(response.result.value)
                print(object)
              } else {
                // handle failure data
              }
         }

Alfter:

APIClient.events(arg1, arg2: arg2) { (result) in
    switch result {
        case let .Success(value):
            print(value)
        case let .Failure(status, description):
            print("status: \(status); description: \(description)")
    }
}

About

A demo for networking architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published