Class: GdsApi::GovukHeaders
- Inherits:
-
Object
- Object
- GdsApi::GovukHeaders
- Defined in:
- lib/gds_api/govuk_headers.rb
Class Method Summary collapse
Class Method Details
.clear_headers ⇒ Object
12 13 14 |
# File 'lib/gds_api/govuk_headers.rb', line 12 def clear_headers Thread.current[:headers] = {} end |
.headers ⇒ Object
8 9 10 |
# File 'lib/gds_api/govuk_headers.rb', line 8 def headers header_data.reject { |_k, v| v.nil? || v.empty? } end |
.set_header(header_name, value) ⇒ Object
4 5 6 |
# File 'lib/gds_api/govuk_headers.rb', line 4 def set_header(header_name, value) header_data[header_name] = value end |