Method: HTTPX::Plugins::ContentDigest::OptionsMethods#option_content_digest_algorithm

Defined in:
lib/httpx/plugins/content_digest.rb

#option_content_digest_algorithm(value) ⇒ Object

Raises:

  • (TypeError)


46
47
48
49
50
# File 'lib/httpx/plugins/content_digest.rb', line 46

def option_content_digest_algorithm(value)
  raise TypeError, ":content_digest_algorithm must be one of 'sha-256', 'sha-512'" unless SUPPORTED_ALGORITHMS.key?(value)

  value
end