lib/adobe_media_encoder/api/client.rb
# Formats a HTTPRequest or HTTPResponse body for log output.
# @param [HTTPRequest|HTTPResponse] obj
# @return [String]
Formats a HTTPRequest or HTTPResponse body for log output.
Formats a HTTPRequest or HTTPResponse body for log output .
def format_body_for_log_output(obj)
          output = ''
          if obj.content_type == 'application/json'
            if @log_pretty_print_body
              _body = obj.body
              output << "\n"
              output << JSON.pretty_generate(JSON.parse(_body)) rescue _body
              return output
            else
              return obj.body
            end
          else
            return obj.body.inspect
          end
        end
def format_body_for_log_output ( obj ) output = '' if obj . content_type == 'application/json' if @log_pretty_print_body _body = obj . body output << "\n" output << JSON . pretty_generate ( JSON . parse ( _body ) ) rescue _body return output else return obj . body end else return obj . body . inspect end end
Formats a HTTPRequest or HTTPResponse body for log output.
Formats a HTTPRequest or HTTPResponse body for log output .
None
String
obj
None