Skip to content

Instantly share code, notes, and snippets.

@farhan-syed
Created June 1, 2018 08:59
Show Gist options
  • Save farhan-syed/0f5c7b11a320b33dcf3cb80e1e37a05d to your computer and use it in GitHub Desktop.
Save farhan-syed/0f5c7b11a320b33dcf3cb80e1e37a05d to your computer and use it in GitHub Desktop.
let postsURLEndPoint: String = "https://jsonplaceholder.typicode.com/posts/1"
Alamofire.request(postsURLEndPoint)
.responseJSON { response in
guard let json = response.result.value as? [String:Any] else {
// Did not get JSON object
return
}
// Do something with JSON
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment