QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
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 );
85 QString responseFormat;
96 setHeader(
"Content-Type", responseFormat );
virtual void flush() SIP_THROW(QgsServerException)
Flushes the current output buffer to the network.
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::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
virtual QByteArray data() const =0
Gets the data written so far.
virtual bool headersSent() const =0
Returns true if the headers have already been sent.
Exception base class for server exceptions.
virtual void finish() SIP_THROW(QgsServerException)
Finish the response, ending the transaction.
virtual QIODevice * io()=0
Returns the underlying QIODevice.
virtual QByteArray formatResponse(QString &responseFormat) const
Formats the exception for sending to client.
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...