class FDK::OutHeaders
Represents outbound HTTP headers
Public Class Methods
new(headers, key_in_fn)
click to toggle source
Calls superclass method
FDK::InHeaders::new
# File lib/fdk/context.rb, line 53 def initialize(headers, key_in_fn) headers["Fn-Fdk-Version"] = ["fdk-ruby/#{FDK::VERSION}"] headers["Fn-Fdk-Runtime"] = ["ruby/#{RUBY_VERSION}"] super(headers, key_in_fn) end
Public Instance Methods
[]=(key, value)
click to toggle source
# File lib/fdk/context.rb, line 59 def []=(key, value) if value.is_a? Array h = [] value.each { |x| h.push(x.to_s) } @headers[header_key(key)] = h else @headers[header_key(key)] = [value.to_s] end end
delete(key)
click to toggle source
# File lib/fdk/context.rb, line 69 def delete(key) @headers.delete header_key(key) end