planck 2019-10-28

anybody know how to post a json payload with planck.http?

@austin.chamberlin Via opts you can control things like :accept an :content-type

(Be sure to check out “the relevant options for get”)

Part of the trouble is I don't understand much about http.

(def payload "{\"some\": \"json\"}")
(planck.http/post "" {:content-type :json } )

I'm wondering how I would send that payload

It would go under the :body key in opts

Got another q: Is there a way to prompt for interactive input like:

Do the thing? (y/n):

user=> (read-line) y “y”

requires user to hit enter

In addition to planck.core/read-line there is also planck.core/read-password which protects the input terminal.