#include <Wt/Http/Response>
Public Member Functions | |
| void | setStatus (int status) |
| Sets the response status. | |
| void | setMimeType (const std::string &mimeType) |
| Set the content mime type. | |
| void | addHeader (const std::string &name, const std::string &value) |
| Add an HTTP header. | |
| ResponseContinuation * | createContinuation () |
| Create a continuation object for this response. | |
| ResponseContinuation * | continuation () const |
| Return the continuation, if one was created for this response. | |
| std::ostream & | out () |
| Returns the stream for getting the response output. | |
Friends | |
| class | Wt::WResource |
Use the HTTP response to format a response to an HTTP request (see Request).
More specifically you can:
You may chose to provide only a partial response. In that case, use createContinuation() to create a continuation object to which you can annotate information for the next request to process the response further.
| void Wt::Http::Response::setStatus | ( | int | status | ) |
Sets the response status.
Unless a overriden, 200 OK will be assumed.
| void Wt::Http::Response::setMimeType | ( | const std::string & | mimeType | ) |
Set the content mime type.
The content mimetype is used by the browser to correctly interpret the resource.
| void Wt::Http::Response::addHeader | ( | const std::string & | name, | |
| const std::string & | value | |||
| ) |
Add an HTTP header.
Headers may be added only before setting the content mime-type (setMimeType()), and before streaming any data to the out() stream.
| ResponseContinuation * Wt::Http::Response::createContinuation | ( | ) |
Create a continuation object for this response.
By creating a continuation object, a new request will be made for the resource to retrieve more data, after the current data has been sent out.
| ResponseContinuation * Wt::Http::Response::continuation | ( | ) | const |
Return the continuation, if one was created for this response.
Returns the continuation that was previously created using createContinuation(), or 0 if no continuation was created yet.
1.5.6