+//------------------------------------------------------------------------------
+
+void Request::setCloseAfterComplete()
+{
+ _willClose = true;
+}
+
+//------------------------------------------------------------------------------
+bool Request::serverSupportsPipelining() const
+{
+ return (_responseVersion == HTTP_1_1) && !_connectionCloseHeader;
+}
+
+//------------------------------------------------------------------------------
+bool Request::isComplete() const
+{
+ return _ready_state == DONE || _ready_state == FAILED;
+}
+
+//------------------------------------------------------------------------------
+bool Request::hasBodyData() const
+{
+ return !_request_media_type.empty();
+}
+
+//------------------------------------------------------------------------------
+std::string Request::bodyType() const
+{
+ return _request_media_type;
+}
+
+//------------------------------------------------------------------------------
+size_t Request::bodyLength() const
+{
+ return _request_data.length();
+}
+
+//------------------------------------------------------------------------------
+size_t Request::getBodyData(char* s, size_t offset, size_t max_count) const
+{
+ size_t bytes_available = _request_data.size() - offset;
+ size_t bytes_to_read = std::min(bytes_available, max_count);
+
+ memcpy(s, _request_data.data() + offset, bytes_to_read);
+
+ return bytes_to_read;
+}
+
+} // of namespace HTTP