doto and setting property conditionally
I want to write: (defn download-web-page "Downloads the webpage at the given url and returns its contents." [^String url ^String user ^String password] (with-open [client (doto (WebClient.) (when user (.set_Credentials (NetworkCredential. user password ""))))] (.DownloadString client url))) So I ...