27 QIODevice *iodev =
io();
32 iodev->write( data.toUtf8() );
43 QIODevice *iodev =
io();
46 return iodev->write( byteArray );
54 QIODevice *iodev =
io();
57 return iodev->write( data, maxsize );
64 QIODevice *iodev =
io();
67 return iodev->write( data );
74 QString responseFormat;
85 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
Format 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.