Simple HTTP Requests (GET, POST, etc) in swift
ezJson().postRequest(myUrl: "http://ezjson.herokuapp.com/ezJSON", params: ["key" : "value"]){ (returnedObject : AnyObject?, error : NSError?) in
if (returnedObject != nil){
print("\(returnedObject)")
}
}
ezJson().getRequest(myUrl: "http://ezjson.herokuapp.com/ezJSON/test") { (returnedObject : AnyObject?, error : NSError?) in
if (returnedObject != nil){
print("\(returnedObject)")
}
}