Add babashka.curl (undocumented)

This commit is contained in:
Michiel Borkent 2020-03-07 14:02:37 +01:00 committed by GitHub
parent 8955431ee7
commit 1297084d53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 2 deletions

3
.gitmodules vendored
View file

@ -2,3 +2,6 @@
path = sci
url = https://github.com/borkdude/sci
branch = master
[submodule "babashka.curl"]
path = babashka.curl
url = https://github.com/borkdude/babashka.curl

1
babashka.curl Submodule

@ -0,0 +1 @@
Subproject commit bb6226c8fe11a390dd2ed771e5ca78fb87b706e3

View file

@ -7,7 +7,7 @@
:url "https://github.com/borkdude/babashka"}
:license {:name "Eclipse Public License 1.0"
:url "http://opensource.org/licenses/eclipse-1.0.php"}
:source-paths ["src" "sci/src"]
:source-paths ["src" "sci/src" "babashka.curl/src"]
:resource-paths ["resources" "sci/resources"]
:dependencies [[org.clojure/clojure "1.10.2-alpha1"]
[org.clojure/tools.reader "1.3.2"]

View file

@ -0,0 +1,12 @@
(ns babashka.impl.curl
{:no-doc true}
(:require [babashka.curl :as curl]))
(def curl-namespace
{'request curl/request
'get curl/get
'patch curl/patch
'post curl/post
'put curl/put
'head curl/head
'curl-command curl/curl-command})

View file

@ -13,6 +13,7 @@
[babashka.impl.clojure.stacktrace :refer [stacktrace-namespace]]
[babashka.impl.common :as common]
[babashka.impl.csv :as csv]
[babashka.impl.curl :refer [curl-namespace]]
[babashka.impl.pipe-signal-handler :refer [handle-pipe! pipe-signal-received?]]
[babashka.impl.repl :as repl]
[babashka.impl.socket-repl :as socket-repl]
@ -257,7 +258,8 @@ Everything after that is bound to *command-line-args*."))
'clojure.repl {'demunge demunge}
'clojure.test t/clojure-test-namespace
'babashka.classpath {'add-classpath add-classpath*}
'clojure.pprint pprint-namespace})
'clojure.pprint pprint-namespace
'babashka.curl curl-namespace})
(def bindings
{'java.lang.System/exit exit ;; override exit, so we have more control