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

Example causes error in Xcode 6 beta 6. #14

Closed
ghost opened this issue Aug 21, 2014 · 1 comment
Closed

Example causes error in Xcode 6 beta 6. #14

ghost opened this issue Aug 21, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 21, 2014

var request = HTTPTask()
request.requestSerializer = JSONRequestSerializer()
request.responseSerializer = JSONResponseSerializer()
request.POST("http://" + self.host + "/authentication",parameters: ["email": self.username, "password": self.password], success: {
(response: HTTPResponse) -> Void in
  if response.responseObject {
    let dict = response.responseObject as Dictionary<String, AnyObject>
    println(dict)
  }
}, 
failure: {(error: NSError) -> Void in
  println(error)
})

Produces this error & Xcode's proposed fix:

screen shot 2014-08-20 at 8 49 14 pm

Xcode's fix compiles and works in simulator.

@daltoniam
Copy link
Owner

Nice catch, totally spaced updated those. Just updated them. Thanks!

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

No branches or pull requests

1 participant