def post.json

bend-kit-hairpin@0.14.0.0 · hairpin.bend:499

import bend-kit-hairpin@0.14.0.0/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

499# POST v as compact JSON, with content-type: application/json.
500def post.json(c: Client, url: String, v: Json.Val) -> IO(Client & Result<&1, &1, Err, Http.Res>):
501  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.