Method: Jdoc::Link#request_body

Defined in:
lib/jdoc/link.rb

#request_bodyString?

Returns Example request body in JSON format.

Returns:

  • (String, nil)

    Example request body in JSON format



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/jdoc/link.rb', line 84

def request_body
  body = case
  when content_type_multipart?
    request_body_in_multipart
  when content_type_json?
    request_body_in_json
  else
    ""
  end
  body + "\n"
end