def put
import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4import Base
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
993# PutObject. mime: Content-Type, "" for none. The ETag comes back.
994def put(c: Client, bucket: String, key: String, +mime: String, body: Bytes.Bytes) -> IO(Client & Result<&1, &1, Err, String>):
995 +h = Bool.pick(Map<&2, List<&2, String>>, String.is_empty(mime), Http.empty(), Http.set(Http.empty(), "content-type", mime))
996 do IO<Client & Result<&1, &1, Err, String>>:
997 x : Client & Result<&1, &1, Err, Http.Res> <- call(c, "PUT", bucket, key, "", h, body)
998 return put.done(x)
Uses (18)
Used by (0)
No other definition uses this definition.