module Roda::RodaPlugins::EarlyHints::InstanceMethods

  1. lib/roda/plugins/early_hints.rb

Methods

Public Instance

  1. send_early_hints

Public Instance methods

send_early_hints(hash)

Send given hash of Early Hints using the rack.early_hints environment variable, currenly only supported by puma. hash given should generally have the single key ‘Link’, and a string or array of strings for each of the early hints.

[show source]
   # File lib/roda/plugins/early_hints.rb
15 def send_early_hints(hash)
16   if eh_proc = env['rack.early_hints']
17     eh_proc.call(hash)
18   end
19 end