(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // MARK: - Adding a header to a single request | |
| func doRequestWithHeaders1() { | |
| let headers: HTTPHeaders = [ | |
| "X-Mashape-Key": MY_API_KEY, | |
| "Accept": "application/json" | |
| ] | |
| Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers) | |
| .responseJSON { response in | |
| debugPrint(response) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.