module HTTPX::Plugins::ContentDigest::OptionsMethods

  1. lib/httpx/plugins/content_digest.rb

add support for the following options:

:content_digest_algorithm

the digest algorithm to use. Currently supports ‘sha-256` and `sha-512`. (defaults to `sha-256`)

:encode_content_digest

whether a Content-Digest header should be computed for the request; can also be a callable object (i.e. ->(req) { ... }, defaults to true)

:validate_content_digest

whether a Content-Digest header in the response should be validated; can also be a callable object (i.e. ->(res) { ... }, defaults to false)

Public Instance methods

option_content_digest_algorithm(value)
[show source]
   # File lib/httpx/plugins/content_digest.rb
46 def option_content_digest_algorithm(value)
47   raise TypeError, ":content_digest_algorithm must be one of 'sha-256', 'sha-512'" unless SUPPORTED_ALGORITHMS.key?(value)
48 
49   value
50 end
option_encode_content_digest(value)
[show source]
   # File lib/httpx/plugins/content_digest.rb
52 def option_encode_content_digest(value)
53   value
54 end
option_validate_content_digest(value)
[show source]
   # File lib/httpx/plugins/content_digest.rb
56 def option_validate_content_digest(value)
57   value
58 end