=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
import Foundation | |
import PlaygroundSupport | |
URLCache.shared = URLCache(memoryCapacity: 0, diskCapacity: 0, diskPath: nil) | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
// Refer to the example: https://grokswift.com/simple-rest-with-swift/ | |
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todo/1" | |
guard let url = URL(string: todoEndpoint) else { | |
print("Error: cannot create URL") |