class Protocol::HTTP::Body::Digestable
def etag(weak: false)
@parameter weak [Boolean] If true, the ETag is marked as weak.
Generate an appropriate ETag for the digest, assuming it is complete. If you call this method before the body is fully read, the ETag will be incorrect.
def etag(weak: false) if weak "W/\"#{digest.hexdigest}\"" else "\"#{digest.hexdigest}\"" end end