Last active
November 28, 2020 19:29
-
-
Save nbardiuk/166dc6695bf55a351fa3070fd4065b8a to your computer and use it in GitHub Desktop.
Clojure shebang wtih arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S clj -Sdeps '{:deps {clj-http/clj-http {:mvn/version "3.11.0"} cheshire/cheshire {:mvn/version "5.10.0"}}}' | |
(require '[clj-http.client :as http]) | |
(require '[cheshire.core :as json]) | |
(require '[clojure.pprint :refer [pprint]]) | |
(let [url (or (first *command-line-args*) "https://httpbin.org/get?q=a") | |
{:keys [body headers]} (http/get url)] | |
(pprint headers) | |
(pprint (json/decode body))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment