QGIS API Documentation
3.0.2-Girona (307d082)
|
This class is an interface hiding the details of reading input and writing output from/to a wms request mechanism. More...
#include <qgsrequesthandler.h>
Public Member Functions | |
QgsRequestHandler (QgsServerRequest &request, QgsServerResponse &response) | |
Constructor. More... | |
void | appendBody (const QByteArray &body) |
Set the info format string such as "text/xml". More... | |
QByteArray | body () const |
Return response body data. More... | |
void | clear () |
Clears the response body and headers. More... | |
void | clearBody () |
Clear response buffer. More... | |
QByteArray | data () const |
Return request POST data (can be null) More... | |
bool | exceptionRaised () const |
Pointer to last raised exception. More... | |
QString | format () const |
Return the requested format string. More... | |
bool | headersSent () const |
Return true if the HTTP headers were already sent to the client. More... | |
QString | parameter (const QString &key) const |
Return a request parameter. More... | |
QMap< QString, QString > | parameterMap () const |
Return the parsed parameters as a key-value pair, to modify a parameter setParameter( const QString &key, const QString &value) and removeParameter(const QString &key) must be used. More... | |
void | parseInput () |
Parses the input and creates a request neutral Parameter/Value map. More... | |
void | removeParameter (const QString &key) |
Remove a request parameter. More... | |
void | removeRequestHeader (const QString &name) |
Remove an HTTP request header. More... | |
void | removeResponseHeader (const QString &name) |
Remove an HTTP response header. More... | |
QString | requestHeader (const QString &name) const |
Retrieve request header value. More... | |
QMap< QString, QString > | requestHeaders () const |
Return the Request headers. More... | |
QString | responseHeader (const QString &name) const |
Retrieve response header value. More... | |
QMap< QString, QString > | responseHeaders () const |
Return the response headers. More... | |
void | sendResponse () |
Send out HTTP headers and flush output buffer. More... | |
void | setParameter (const QString &key, const QString &value) |
Set a request parameter. More... | |
void | setRequestHeader (const QString &name, const QString &value) |
Set an HTTP request header. More... | |
void | setResponseHeader (const QString &name, const QString &value) |
Set an HTTP response header. More... | |
void | setServiceException (const QgsServerException &ex) |
Allow plugins to return a QgsMapServiceException. More... | |
void | setStatusCode (int code) |
Set response http status code. More... | |
int | statusCode () const |
Return response http status code. More... | |
QString | url () const |
Return request url. More... | |
This class is an interface hiding the details of reading input and writing output from/to a wms request mechanism.
Definition at line 47 of file qgsrequesthandler.h.
|
explicit |
Constructor.
Note that QgsServerRequest and QgsServerResponse MUST live in the same scope
void QgsRequestHandler::appendBody | ( | const QByteArray & | body | ) |
Set the info format string such as "text/xml".
QByteArray QgsRequestHandler::body | ( | ) | const |
Return response body data.
void QgsRequestHandler::clear | ( | ) |
Clears the response body and headers.
void QgsRequestHandler::clearBody | ( | ) |
Clear response buffer.
QByteArray QgsRequestHandler::data | ( | ) | const |
Return request POST data (can be null)
bool QgsRequestHandler::exceptionRaised | ( | ) | const |
Pointer to last raised exception.
|
inline |
Return the requested format string.
Definition at line 143 of file qgsrequesthandler.h.
bool QgsRequestHandler::headersSent | ( | ) | const |
Return true if the HTTP headers were already sent to the client.
QString QgsRequestHandler::parameter | ( | const QString & | key | ) | const |
Return a request parameter.
QMap<QString, QString> QgsRequestHandler::parameterMap | ( | ) | const |
Return the parsed parameters as a key-value pair, to modify a parameter setParameter( const QString &key, const QString &value) and removeParameter(const QString &key) must be used.
void QgsRequestHandler::parseInput | ( | ) |
Parses the input and creates a request neutral Parameter/Value map.
void QgsRequestHandler::removeParameter | ( | const QString & | key | ) |
Remove a request parameter.
void QgsRequestHandler::removeRequestHeader | ( | const QString & | name | ) |
Remove an HTTP request header.
void QgsRequestHandler::removeResponseHeader | ( | const QString & | name | ) |
Remove an HTTP response header.
QString QgsRequestHandler::requestHeader | ( | const QString & | name | ) | const |
Retrieve request header value.
QMap<QString, QString> QgsRequestHandler::requestHeaders | ( | ) | const |
Return the Request headers.
QString QgsRequestHandler::responseHeader | ( | const QString & | name | ) | const |
Retrieve response header value.
QMap<QString, QString> QgsRequestHandler::responseHeaders | ( | ) | const |
Return the response headers.
void QgsRequestHandler::sendResponse | ( | ) |
Send out HTTP headers and flush output buffer.
This method is intended only for streaming partial content.
void QgsRequestHandler::setParameter | ( | const QString & | key, |
const QString & | value | ||
) |
Set a request parameter.
void QgsRequestHandler::setRequestHeader | ( | const QString & | name, |
const QString & | value | ||
) |
Set an HTTP request header.
void QgsRequestHandler::setResponseHeader | ( | const QString & | name, |
const QString & | value | ||
) |
Set an HTTP response header.
void QgsRequestHandler::setServiceException | ( | const QgsServerException & | ex | ) |
Allow plugins to return a QgsMapServiceException.
void QgsRequestHandler::setStatusCode | ( | int | code | ) |
Set response http status code.
int QgsRequestHandler::statusCode | ( | ) | const |
Return response http status code.
QString QgsRequestHandler::url | ( | ) | const |
Return request url.