Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > d4089b27bfd3289c6baf8b0975a53f9e > files > 413

poco-doc-1.3.6p1-1.fc13.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::HTTPServerResponse</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class HTTPServerResponse</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> HTTPServer<br />
<b>Header:</b> Poco/Net/HTTPServerResponse.h</p>
<h2>Description</h2>
<div class="description">
<p>This subclass of <a href="Poco.Net.HTTPResponse.html" title="class Poco::Net::HTTPResponse">HTTPResponse</a> is used for representing server-side HTTP responses. </p>
<p>A <a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a> is passed to the handleRequest() method of <a href="Poco.Net.HTTPRequestHandler.html" title="class Poco::Net::HTTPRequestHandler">HTTPRequestHandler</a>. </p>
<p>handleRequest() must set a status code and optional reason phrase, set headers as necessary, and provide a message body. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.Net.HTTPResponse.html" title="class Poco::Net::HTTPResponse">HTTPResponse</a></p>
<p><b>All Base Classes: </b><a href="Poco.Net.HTTPMessage.html" title="class Poco::Net::HTTPMessage">HTTPMessage</a>, <a href="Poco.Net.HTTPResponse.html" title="class Poco::Net::HTTPResponse">HTTPResponse</a>, <a href="Poco.Net.MessageHeader.html" title="class Poco::Net::MessageHeader">MessageHeader</a>, <a href="Poco.Net.NameValueCollection.html" title="class Poco::Net::NameValueCollection">NameValueCollection</a></p>
<p><b>Known Derived Classes: </b><a href="Poco.Net.HTTPServerResponseImpl.html" title="class Poco::Net::HTTPServerResponseImpl">HTTPServerResponseImpl</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.HTTPServerResponse.html#13125" title="Poco::Net::HTTPServerResponse::redirect()">redirect</a>, <a href="Poco.Net.HTTPServerResponse.html#13127" title="Poco::Net::HTTPServerResponse::requireAuthentication()">requireAuthentication</a>, <a href="Poco.Net.HTTPServerResponse.html#13118" title="Poco::Net::HTTPServerResponse::send()">send</a>, <a href="Poco.Net.HTTPServerResponse.html#13122" title="Poco::Net::HTTPServerResponse::sendBuffer()">sendBuffer</a>, <a href="Poco.Net.HTTPServerResponse.html#13117" title="Poco::Net::HTTPServerResponse::sendContinue()">sendContinue</a>, <a href="Poco.Net.HTTPServerResponse.html#13119" title="Poco::Net::HTTPServerResponse::sendFile()">sendFile</a>, <a href="Poco.Net.HTTPServerResponse.html#13129" title="Poco::Net::HTTPServerResponse::sent()">sent</a></p>
<p><b>Inherited Functions: </b><a href="Poco.Net.NameValueCollection.html#14067" title="Poco::Net::NameValueCollection::add()">add</a>, <a href="Poco.Net.HTTPResponse.html#12964" title="Poco::Net::HTTPResponse::addCookie()">addCookie</a>, <a href="Poco.Net.NameValueCollection.html#14079" title="Poco::Net::NameValueCollection::begin()">begin</a>, <a href="Poco.Net.NameValueCollection.html#14085" title="Poco::Net::NameValueCollection::clear()">clear</a>, <a href="Poco.Net.NameValueCollection.html#14081" title="Poco::Net::NameValueCollection::empty()">empty</a>, <a href="Poco.Net.NameValueCollection.html#14080" title="Poco::Net::NameValueCollection::end()">end</a>, <a href="Poco.Net.NameValueCollection.html#14083" title="Poco::Net::NameValueCollection::erase()">erase</a>, <a href="Poco.Net.NameValueCollection.html#14077" title="Poco::Net::NameValueCollection::find()">find</a>, <a href="Poco.Net.NameValueCollection.html#14070" title="Poco::Net::NameValueCollection::get()">get</a>, <a href="Poco.Net.HTTPMessage.html#12781" title="Poco::Net::HTTPMessage::getChunkedTransferEncoding()">getChunkedTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12775" title="Poco::Net::HTTPMessage::getContentLength()">getContentLength</a>, <a href="Poco.Net.HTTPMessage.html#12786" title="Poco::Net::HTTPMessage::getContentType()">getContentType</a>, <a href="Poco.Net.HTTPResponse.html#12966" title="Poco::Net::HTTPResponse::getCookies()">getCookies</a>, <a href="Poco.Net.HTTPResponse.html#12963" title="Poco::Net::HTTPResponse::getDate()">getDate</a>, <a href="Poco.Net.HTTPMessage.html#12789" title="Poco::Net::HTTPMessage::getKeepAlive()">getKeepAlive</a>, <a href="Poco.Net.HTTPResponse.html#12955" title="Poco::Net::HTTPResponse::getReason()">getReason</a>, <a href="Poco.Net.HTTPResponse.html#12972" title="Poco::Net::HTTPResponse::getReasonForStatus()">getReasonForStatus</a>, <a href="Poco.Net.HTTPResponse.html#12950" title="Poco::Net::HTTPResponse::getStatus()">getStatus</a>, <a href="Poco.Net.HTTPMessage.html#12778" title="Poco::Net::HTTPMessage::getTransferEncoding()">getTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12772" title="Poco::Net::HTTPMessage::getVersion()">getVersion</a>, <a href="Poco.Net.NameValueCollection.html#14075" title="Poco::Net::NameValueCollection::has()">has</a>, <a href="Poco.Net.NameValueCollection.html#14062" title="Poco::Net::NameValueCollection::operator()">operator</a>, <a href="Poco.Net.MessageHeader.html#13915" title="Poco::Net::MessageHeader::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.MessageHeader.html#13933" title="Poco::Net::MessageHeader::quote()">quote</a>, <a href="Poco.Net.HTTPResponse.html#12970" title="Poco::Net::HTTPResponse::read()">read</a>, <a href="Poco.Net.NameValueCollection.html#14064" title="Poco::Net::NameValueCollection::set()">set</a>, <a href="Poco.Net.HTTPMessage.html#12779" title="Poco::Net::HTTPMessage::setChunkedTransferEncoding()">setChunkedTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12773" title="Poco::Net::HTTPMessage::setContentLength()">setContentLength</a>, <a href="Poco.Net.HTTPMessage.html#12784" title="Poco::Net::HTTPMessage::setContentType()">setContentType</a>, <a href="Poco.Net.HTTPResponse.html#12961" title="Poco::Net::HTTPResponse::setDate()">setDate</a>, <a href="Poco.Net.HTTPMessage.html#12787" title="Poco::Net::HTTPMessage::setKeepAlive()">setKeepAlive</a>, <a href="Poco.Net.HTTPResponse.html#12953" title="Poco::Net::HTTPResponse::setReason()">setReason</a>, <a href="Poco.Net.HTTPResponse.html#12948" title="Poco::Net::HTTPResponse::setStatus()">setStatus</a>, <a href="Poco.Net.HTTPResponse.html#12956" title="Poco::Net::HTTPResponse::setStatusAndReason()">setStatusAndReason</a>, <a href="Poco.Net.HTTPMessage.html#12776" title="Poco::Net::HTTPMessage::setTransferEncoding()">setTransferEncoding</a>, <a href="Poco.Net.HTTPMessage.html#12770" title="Poco::Net::HTTPMessage::setVersion()">setVersion</a>, <a href="Poco.Net.NameValueCollection.html#14082" title="Poco::Net::NameValueCollection::size()">size</a>, <a href="Poco.Net.MessageHeader.html#13921" title="Poco::Net::MessageHeader::splitElements()">splitElements</a>, <a href="Poco.Net.MessageHeader.html#13925" title="Poco::Net::MessageHeader::splitParameters()">splitParameters</a>, <a href="Poco.Net.NameValueCollection.html#14060" title="Poco::Net::NameValueCollection::swap()">swap</a>, <a href="Poco.Net.HTTPResponse.html#12968" title="Poco::Net::HTTPResponse::write()">write</a></p>
<h2>Constructors</h2>
<h3><a name="13115">HTTPServerResponse</a></h3>
<p class="decl"><a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="13116">~HTTPServerResponse</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.HTTPServerResponse.html" title="class Poco::Net::HTTPServerResponse">HTTPServerResponse</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="13125">redirect</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void redirect(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; uri<br />) = 0;</p>
<div class="description">
<p>Sets the status code to 302 (Found) and sets the &quot;Location&quot; header field to the given <a href="Poco.URI.html" title="class Poco::URI">URI</a>, which according to the HTTP specification, must be absolute. </p>
<p>Must not be called after <a href="Poco.Net.HTTPServerResponse.html#13118" title="Poco::Net::HTTPServerResponse::send()">send</a>() has been called. </p>
</div>
<h3><a name="13127">requireAuthentication</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void requireAuthentication(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; realm<br />) = 0;</p>
<div class="description">
<p>Sets the status code to 401 (Unauthorized) and sets the &quot;WWW-Authenticate&quot; header field according to the given realm. </p>
</div>
<h3><a name="13118">send</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual std::ostream &amp; send() = 0;</p>
<div class="description">
<p>Sends the response header to the client and returns an output stream for sending the response body. </p>
<p>The returned stream is valid until the response object is destroyed. </p>
<p>Must not be called after <a href="Poco.Net.HTTPServerResponse.html#13119" title="Poco::Net::HTTPServerResponse::sendFile()">sendFile</a>(), <a href="Poco.Net.HTTPServerResponse.html#13122" title="Poco::Net::HTTPServerResponse::sendBuffer()">sendBuffer</a>()  or <a href="Poco.Net.HTTPServerResponse.html#13125" title="Poco::Net::HTTPServerResponse::redirect()">redirect</a>() has been called. </p>
</div>
<h3><a name="13122">sendBuffer</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void sendBuffer(<br />&nbsp;&nbsp;&nbsp;&nbsp;const void * pBuffer,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::size_t length<br />) = 0;</p>
<div class="description">
<p>Sends the response header to the client, followed by the contents of the given buffer. </p>
<p>The Content-Length header of the response is set to length and chunked transfer encoding is disabled. </p>
<p>If both the HTTP message header and body (from the given buffer) fit into one single network packet, the  complete response can be sent in one network packet. </p>
<p>Must not be called after <a href="Poco.Net.HTTPServerResponse.html#13118" title="Poco::Net::HTTPServerResponse::send()">send</a>(), <a href="Poco.Net.HTTPServerResponse.html#13119" title="Poco::Net::HTTPServerResponse::sendFile()">sendFile</a>()   or <a href="Poco.Net.HTTPServerResponse.html#13125" title="Poco::Net::HTTPServerResponse::redirect()">redirect</a>() has been called. </p>
</div>
<h3><a name="13117">sendContinue</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void sendContinue() = 0;</p>
<div class="description">
<p>Sends a 100 Continue response to the client. </p>
</div>
<h3><a name="13119">sendFile</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void sendFile(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; path,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; mediaType<br />) = 0;</p>
<div class="description">
<p>Sends the response header to the client, followed by the content of the given file. </p>
<p>Must not be called after <a href="Poco.Net.HTTPServerResponse.html#13118" title="Poco::Net::HTTPServerResponse::send()">send</a>(), <a href="Poco.Net.HTTPServerResponse.html#13122" title="Poco::Net::HTTPServerResponse::sendBuffer()">sendBuffer</a>()  or <a href="Poco.Net.HTTPServerResponse.html#13125" title="Poco::Net::HTTPServerResponse::redirect()">redirect</a>() has been called. </p>
<p>Throws a <a href="Poco.FileNotFoundException.html" title="class Poco::FileNotFoundException">FileNotFoundException</a> if the file cannot be found, or an <a href="Poco.OpenFileException.html" title="class Poco::OpenFileException">OpenFileException</a> if the file cannot be opened. </p>
</div>
<h3><a name="13129">sent</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual bool sent() const = 0;</p>
<div class="description">
<p>Returns true if the response (header) has been sent. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>