freshOS / ws-deprecated

⚠️ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)
MIT License
353 stars 32 forks source link

Ambiguos use of 'get(_:params:)' #11

Closed ZephiroRB closed 8 years ago

ZephiroRB commented 8 years ago

I upgrade with carthage update and run code error

ws.WS:26:17: note: found this candidate
    public func get(url: String, params: [String : AnyObject] = default) -> then.Promise<Arrow.JSON>
                ^
ws.WS:30:17: note: found this candidate
    public func get(url: String, params: [String : AnyObject] = default) -> then.Promise<Void>
s4cha commented 8 years ago

@zephiro I think you'll have to explicitly specify the one you want, for instance for the JSON version :

 ws.get("/test").then { json in

}

becomes

ws.get("/test").then { (json:JSON) in  

}

Hope it helps :)