def call.sign

bend-kit-sigv4@0.11.0.1 · sigv4.bend:937

import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4
import Base
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

937# The signer hashes one copy of the body; the other goes on the wire.
938def call.sign(got: Where, +endpoint: String, +region: String, +style: Style, +creds: Credentials,
939    http: Hairpin.Client, +method: String, +query: String, extra: Map<&2, List<&2, String>>, +date: String,
940    b: Bytes.Bytes & Bytes.Bytes) -> IO(Client & Result<&1, &1, Err, Http.Res>):
941  Where{origin, host, +path} = got
942  (keep, copy) = b
943  do IO<Client & Result<&1, &1, Err, Http.Res>>:
944    s : Result<&1, &1, U32 & String, String & String> <- authorize(creds, region, "s3", date, method, path, query, host, copy)
945    call.send(s, Config{endpoint, region, style, creds}, http, method, url(origin, path, query), extra, date, token(creds), keep)

Uses (22)

Used by (1)