aboutsummaryrefslogtreecommitdiff
path: root/test/03-api/02-body/patch.janet
blob: 3987f56b1153b1df4673ae79f581adbcd727ea38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
(use ../../../jurl)
(import spork/json)
(def body "hi")
(def res ((->> "https://pie.dev/anything"
               (http :patch)
               (body-plain body))))
(assert (= 200 (res :status)))
(def bres (json/decode (res :body) true))
(assert (= "PATCH" (bres :method)))
(assert (= body (bres :data)))
(assert (= "text/plain" (get-in bres [:headers :Content-Type])))