Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Result based completion #166

Closed
wants to merge 1 commit into from
Closed

Conversation

3lvis
Copy link
Owner

@3lvis 3lvis commented Dec 10, 2016

let networking = Networking(baseURL: baseURL)
networking.get("/get") { result in
    switch result {
    case let .success(json, headers):
        let json = json as? [String: Any] ?? [String: Any]()
        // handle JSON
    case let .failure(error, httpResponse):
        // handle failure
    }
}

@3lvis 3lvis closed this Jan 29, 2017
@3lvis 3lvis deleted the feature/result-based-completion branch January 29, 2017 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant