babashka/script/lib_tests/clj_http_lite_test
Michiel Borkent 2c7a938621 Add lib tests
2020-01-07 09:33:37 +01:00

17 lines
546 B
Bash
Executable file

#!/usr/bin/env bash
set -eo pipefail
export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {clj-http-lite {:git/url "https://github.com/borkdude/clj-http-lite" :sha "f44ebe45446f0f44f2b73761d102af3da6d0a13e"}}}' -Spath)
./bb -e "
(require '[clj-http.lite.client :as client])
(prn (:status (client/get \"https://www.clojure.org\")))
(prn (:status (client/get \"https://postman-echo.com/get?foo1=bar1&foo2=bar2\")))
(prn (:status (client/post \"https://postman-echo.com/post\")))
(prn (:status (client/put \"https://postman-echo.com/put\")))
"