Class: QgsBufferServerResponse¶
Defines a buffered server response.
Class Hierarchy¶
Base classes¶
Abstract Methods
Returns all the headers |
|
Send error This method delegates error handling at the server level. |
Methods
Returns body |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsBufferServerResponse. See the FAQ for more details.
Finish the response, ending the transaction |
|
Flushes the current output buffer to the network |
- class qgis.server.QgsBufferServerResponse[source]¶
Bases:
QgsServerResponse- virtual flush(self)[source]¶
Flushes the current output buffer to the network
‘
flush()’ may be called multiple times. For HTTP transactions headers will be written on the first call to ‘flush()’.
- abstract headers(self) Dict[str, str]¶
Returns all the headers
- Return type:
Dict[str, str]
- abstract sendError(self, code: int, message: str | None)[source]¶
Send error This method delegates error handling at the server level. This is different from calling
setReturnCode()which let you return a specific response body. CallingsendError()will end the transaction and any attempt to write data or set headers will be an error.- Parameters:
code (int) – HHTP return code value
message (Optional[str]) – An informative error message