Fork me on GitHub
#babashka
<
2021-11-16
>
Benjamin07:11:48

;; this works with curl:

curl "" --header "Authorization: Bearer $GRAPHQL_TOKEN" \
     --header "Content-Type: application/json" --request POST \
     --data "{\"query\": \"query {currentUser {name}}\"}"

;; trying to use bb.curl:

(curl/post
""
 {:headers
  {"Authorization" (str "Bearer " (get-in config [:gitlab :token]))}
  :body
  "{\"query\": \"query {currentUser {name}}\"}"})

;; => No query string was present
=> nvm I needed to put the json content type so fixed

1
borkdude07:11:44

Try :debug true , then you get the command in the response map

👍 1
heow14:11:41

anyone know the permissions format for (fs/create-dir "foo") ? The docs just reference Files which is a bit opaque

1
borkdude14:11:50

The docs could be improved here. In another function I see:

The :posix-file-permissions option is a string like "rwx------"

👍 1
borkdude14:11:26

Please post an issue about this.

borkdude14:11:40

Or I will do this myself now, actually ;).