Skip to main content

Posts

Showing posts with the label Rest API

app-ads.txt

 google.com, pub-2203413632152319, DIRECT, f08c47fec0942fa0

Rest Api in swift 4 Using URLSession And JSONSerialization Xcode 9 Example

A Short Example call Rest Api with JSON Foundation framework NSURLSession and NSJSONSerialization - Getting Started - Basic Rest API request with Swift 4 func restApiRequest(){ let sessionConfig = URLSessionConfiguration.default // Session Configuration         let sessionUrl = URLSession(configuration: sessionConfig) // Load configuration into Session         let url = URL(string: "YOUR URL STRING")!         let task = sessionUrl.dataTask(with: url, completionHandler: {             (data, response, error) in                 if error != nil {                     print(error!.localizedDescription)                 } else {                     do {                 ...