From 236b9c08518809693f088ab641276f1b06d1c479 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Tue, 12 Jan 2021 14:09:43 -0500 Subject: [PATCH] [+] Add documentation to send() --- ProjectClock/Net.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ProjectClock/Net.swift b/ProjectClock/Net.swift index 0715830..bfa6b60 100644 --- a/ProjectClock/Net.swift +++ b/ProjectClock/Net.swift @@ -36,7 +36,11 @@ func createUrl(_ node: String, _ params: [String: String]? = [:]) -> URL } /// Send a HTTP request -func send(_ api: API, _ params: [String: String]? = [:], _ success: @escaping (String) -> Void, err: @escaping (String) -> Void = { it in }) +func send(_ api: API, // API Node + _ params: [String: String]? = [:], // Parameters to send to the server + _ success: @escaping (String) -> Void, // What to do when success + err: @escaping (String) -> Void = {it in} // What to do when errors happen +) { let url = createUrl(api.loc, params)