| 
    QGIS API Documentation
    3.26.3-Buenos Aires (65e4edfdad)
    
   | 
 
 
 
 
Go to the documentation of this file.
   19 #ifndef QGSFCGISERVERRESPONSE_H 
   20 #define QGSFCGISERVERRESPONSE_H 
   46     void setHeader( 
const QString &key, 
const QString &value ) 
override;
 
   50     QString 
header( 
const QString &key ) 
const override;
 
   52     QMap<QString, QString> 
headers()
 const override { 
return mHeaders; }
 
   60     void sendError( 
int code,  
const QString &message ) 
override;
 
   62     QIODevice *
io() 
override;
 
   66     void flush() 
override;
 
   68     void clear() 
override;
 
   70     QByteArray 
data() 
const override;
 
   77     void setDefaultHeaders();
 
   80     QMap<QString, QString> mHeaders;
 
   82     bool mFinished    = 
false;
 
   83     bool mHeadersSent = 
false;
 
  
virtual void flush() SIP_THROW(QgsServerException)
Flushes the current output buffer to the network.
 
QMap< QString, QString > headers() const override
Returns the header value.
 
virtual void truncate()=0
Truncate data.
 
virtual void clear()=0
Reset all headers and content for this response.
 
Class defining fcgi response.
 
int statusCode() const override
Returns the http status code.
 
virtual QString header(const QString &key) const =0
Returns the header value.
 
virtual void setStatusCode(int code)=0
Set the http status code.
 
virtual void removeHeader(const QString &key)=0
Clear header Undo a previous 'setHeader' call.
 
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.
 
virtual void finish() SIP_THROW(QgsServerException)
Finish the response, ending the transaction.
 
virtual QIODevice * io()=0
Returns the underlying QIODevice.
 
Method
HTTP Method (or equivalent) used for the request.
 
virtual void sendError(int code, const QString &message)=0
Send error This method delegates error handling at the server level.
 
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
 
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...