zeep::http::reply
// In header: </home/maarten/projects/libzeep/zeep/http/reply.hpp> class reply { public: // construct/copy/destruct reply(int = 1, int = 0); reply(const reply &); reply& operator=(const reply &); // public member functions void set_version(int, int); void set_header(const std::string &, const std::string &); std::string get_content_type() const; void set_content_type(const std::string &); void set_content(xml::document &); void set_content(xml::element *); void set_content(const std::string &, const std::string &); void set_content(std::istream *, const std::string &); void to_buffers(std::vector< boost::asio::const_buffer > &); bool data_to_buffers(std::vector< boost::asio::const_buffer > &); std::string get_as_text(); std::size_t get_size() const; status_type get_status() const; // public static functions static reply stock_reply(status_type); static reply redirect(const std::string &); };
reply
public member functionsvoid set_version(int version_major, int version_minor);
void set_header(const std::string & name, const std::string & value);Add a header with name name and value value.
std::string get_content_type() const;
void set_content_type(const std::string & type);Set the Content-Type header.
void set_content(xml::document & doc);Set the content and the content-type header.
void set_content(xml::element * data);Set the content and the content-type header.
void set_content(const std::string & data, const std::string & contentType);Set the content and the content-type header.
void set_content(std::istream * data, const std::string & contentType);
To send a stream of data, with unknown size (using chunked transfer). reply takes ownership of data and deletes it when done.
void to_buffers(std::vector< boost::asio::const_buffer > & buffers);
bool data_to_buffers(std::vector< boost::asio::const_buffer > & buffers);for istream data, continues until data_to_buffers returns false
std::string get_as_text();For debugging purposes.
std::size_t get_size() const;
status_type get_status() const;