Verifies the response body against the expected checksum.
Request Options
:checksum- if set, this is the expected response body checksum.Can be one of:
"md5:(...)""sha1:(...)""sha256:(...)"
Examples
iex> resp = Req.get!("https://httpbingo.org/json", checksum: "sha1:ae5891fe71e8c6432b552b0c3b4394e43f151493")
iex> resp.status
200
iex> Req.get!("https://httpbingo.org/json", checksum: "sha1:bad")
** (Req.ChecksumMismatchError) checksum mismatch
expected: sha1:bad
actual: sha1:ae5891fe71e8c6432b552b0c3b4394e43f151493