Method: FTW::HTTP::Message#body

Defined in:
lib/ftw/http/message.rb

#bodyObject

Get the body of this message

Returns an Enumerable, IO-like object, or String, depending on how this message was built.



73
74
75
76
77
78
79
80
81
82
# File 'lib/ftw/http/message.rb', line 73

def body
  # TODO(sissel): verification todos follow...
  # TODO(sissel): RFC2616 section 4.3 - if there is a message body
  # then one of "Transfer-Encoding" *or* "Content-Length" MUST be present.
  # otherwise, if neither header is present, no body is present.
  # TODO(sissel): Responses to HEAD requests or those with status 1xx, 204,
  # or 304 MUST NOT have a body. All other requests have a message body,
  # even if that body is of zero length.
  return @body
end