class Fictium::Postman::V2Exporter::BodyFormatter

Public Instance Methods

format(http_subject, response: false) click to toggle source
# File lib/fictium/exporters/postman/v2_exporter/body_formatter.rb, line 5
def format(http_subject, response: false)
  return if http_subject.blank?

  body = http_subject[:body]
  return if body.blank?
  return body if response

  { mode: 'raw', raw: body }
end