Last active
November 29, 2017 09:46
-
-
Save pffan91/a49578ec8d66a96dba36f13b7b83e413 to your computer and use it in GitHub Desktop.
NetworkLayerWithMoya_sendRequest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Vladyslav Semenchenko on 15/05/2017. | |
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved. | |
let provider = MoyaProvider<MyServerAPI>() | |
provider.request(.cameras) { (result) in | |
switch result { | |
case .success(let response): | |
// do something with resoinse | |
case .failure(let error): | |
// show error | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! Noticed a small typo in the comment on line 8
It should be -
// do something with the response
P.S - Great blog on medium (y)