Docs for babashka.curl

This commit is contained in:
Michiel Borkent 2020-03-07 14:10:58 +01:00
parent 1297084d53
commit 378b592ac7
3 changed files with 12 additions and 5 deletions

View file

@ -330,6 +330,12 @@ $ bb '((fn [x] (println x) (when (not (signal/pipe-signal-received?)) (recur (in
The namespace `babashka.signal` is aliased as `signal` in the `user` namespace.
#### babashka.curl
The namespace `babashka.curl` is a tiny wrapper around curl. It's aliased as
`curl` in the user namespace. See
[babashka.curl](https://github.com/borkdude/babashka.curl).
## Running a file
Scripts may be executed from a file using `-f` or `--file`:
@ -647,10 +653,10 @@ mark operations (`<!`, `>!`, etc.) map to the double exclamation mark operations
For making HTTP requests you can use:
- [babashka.curl](https://github.com/borkdude/babashka.curl). This library is
included with babashka and aliased as `curl` in the user namespace.
- `slurp` for simple `GET` requests
- [clj-http-lite](https://github.com/borkdude/clj-http-lite) as a library
- `curl` via `clojure.java.shell`. Also see
[babashka.curl](https://github.com/borkdude/babashka.curl).
- [clj-http-lite](https://github.com/borkdude/clj-http-lite) as a library.
### HTTP over Unix sockets

@ -1 +1 @@
Subproject commit bb6226c8fe11a390dd2ed771e5ca78fb87b706e3
Subproject commit 90387425f425cfd3dc955ca2a4d63325bc4b8c2d

View file

@ -228,7 +228,8 @@ Everything after that is bound to *command-line-args*."))
io clojure.java.io
async clojure.core.async
csv clojure.data.csv
json cheshire.core})
json cheshire.core
curl babashka.curl})
(def cp-state (atom nil))