aboutsummaryrefslogtreecommitdiff
path: root/test/03-api/02-body/put.janet
blob: d1ee49b8c9959157b59968d9edf770a59868f520 (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 :put)
               (body-plain body))))
(assert (= 200 (res :status)))
(def bres (json/decode (res :body) true))
(assert (= "PUT" (bres :method)))
(assert (= body (bres :data)))
(assert (= "text/plain" (get-in bres [:headers :Content-Type])))