diff --git a/StudyHallOrg/ContentView.swift b/StudyHallOrg/ContentView.swift index 15a7935..6737702 100644 --- a/StudyHallOrg/ContentView.swift +++ b/StudyHallOrg/ContentView.swift @@ -51,6 +51,30 @@ struct ContentView: View { } } } + + private func callSandboxAPI() { + guard let url = URL(string: "https://sandbox.api.example.com/endpoint") else { + print("Invalid URL") + return + } + + let task = URLSession.shared.dataTask(with: url) { data, response, error in + if let error = error { + print("Error: \(error)") + return + } + + guard let data = data else { + print("No data received") + return + } + + // Process the data + print("Data received: \(data)") + } + + task.resume() + } } #Preview {