def post.json

bend-kit-hairpin@0.13.0.1 · hairpin.bend:510

import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import Base
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-json@0.7.0.0/json.bend as Json

510# POST v as compact JSON, with content-type: application/json.
511def post.json(c: Client, url: String, v: Json.Val) -> IO(Client & Result<&1, &1, Err, Http.Res>):
512  request(c, "POST", url, Http.set(Http.empty(), "content-type", "application/json"), Json.encode.bytes(v))

Uses (12)

Used by (0)

No other definition uses this definition.