27 QIODevice *iodev =
io();
30 iodev->write( data.toUtf8() );
40 QIODevice *iodev =
io();
43 return iodev->write( byteArray );
50 QIODevice *iodev =
io();
53 return iodev->write( data, maxsize );
60 QIODevice *iodev =
io();
63 return iodev->write( data );
70 QString responseFormat;
81 setHeader(
"Content-Type", responseFormat );
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
virtual void clear()=0
Reset all headers and content for this response.
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device...
virtual void setStatusCode(int code)=0
Set the http status code.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Exception base class for server exceptions.
virtual QByteArray data() const =0
Gets the data written so far.
virtual QByteArray formatResponse(QString &responseFormat) const
Formats the exception for sending to client.
virtual QIODevice * io()=0
Returns the underlying QIODevice.
virtual bool headersSent() const =0
Returns true if the headers have already been sent.