                                           (rest-api/unknown-call-handler uri method))))
 
 (defn restcall-options-handler
+    "Empty handler for OPTIONS method."
     []
     (println "Method:  OPTIONS")
     (-> (http-response/response "")
         (http-response/content-type "application/json")))
 
 (defn restcall-head-handler
+    "Empty handler for HEAD method."
     []
     (println "Method:  HEAD")
     (-> (http-response/response "")
         (http-response/content-type "application/json")))
 
 (defn non-api-call-handler
+    "This function is used to handle all API calls. Two parameters are expected:
+     data structure containing HTTP request and string with URI."
     [request uri]
     (condp = uri
         "/"                      (render-front-page request)

                        api-part)))))))

(defn api-call-handler
    [request uri method]
    (if (= uri "/api")
        (rest-api/info-handler request (get-hostname))

    (return-file "error.html" "text/html"))

(defn get-hostname
    "Returns hostname of the server."
    []
    (.. java.net.InetAddress getLocalHost getHostName))

