Skip to content

Commit

Permalink
Refactored the iOS example to use the new Response struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Sep 19, 2015
1 parent 8759805 commit 4429f56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Example/DetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class DetailViewController: UITableViewController {
refreshControl?.beginRefreshing()

let start = CACurrentMediaTime()
request.responseString { request, response, _, result in
request.responseString { response in
let end = CACurrentMediaTime()
self.elapsedTime = end - start

if let response = response {
if let response = response.response {
for (field, value) in response.allHeaderFields {
self.headers["\(field)"] = "\(value)"
}
Expand All @@ -88,7 +88,7 @@ class DetailViewController: UITableViewController {
if let segueIdentifier = self.segueIdentifier {
switch segueIdentifier {
case "GET", "POST", "PUT", "DELETE":
self.body = result.value
self.body = response.result.value
case "DOWNLOAD":
self.body = self.downloadedBodyString()
default:
Expand Down

0 comments on commit 4429f56

Please sign in to comment.