Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions StudyHallOrg/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down