Class: Fictium::Postman::V2Exporter::HeaderFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/fictium/exporters/postman/v2_exporter/header_formatter.rb

Instance Method Summary collapse

Instance Method Details

#format(http_subject) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/fictium/exporters/postman/v2_exporter/header_formatter.rb', line 5

def format(http_subject)
  return [] if http_subject.blank?

  [].tap do |header|
    content = http_subject[:content_type]
    header << { key: 'Content-Type', value: content } if content.present?
    # TODO: Add the rest of the headers
  end
end