HTTPDigest.Req (HTTPDigest v0.1.0)

Copy Markdown View Source

A Req request step that computes and attaches Content-Digest on outgoing requests.

Req.new(base_url: "https://api.example.com")
|> HTTPDigest.Req.attach(digest_algorithms: [:sha256])
|> Req.post!(url: "/payments", body: payload)

Bodies that are not iodata, such as request streams or nil bodies, are passed through untouched.

Summary

Functions

attach(request, opts \\ [])

@spec attach(
  Req.Request.t(),
  keyword()
) :: Req.Request.t()