mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[server] Add url and post data getters to request handler
This completes the API to eventually get rid of all getEnv usage from python server plugins. The request handler has now access to the request URL and POST data without the need to query the env.
This commit is contained in:
parent
e3d79a1fe9
commit
2f75bab844
@ -121,6 +121,16 @@ QByteArray QgsRequestHandler::body() const
|
||||
return mResponse.data();
|
||||
}
|
||||
|
||||
QByteArray QgsRequestHandler::data() const
|
||||
{
|
||||
return mRequest.data( );
|
||||
}
|
||||
|
||||
QString QgsRequestHandler::url() const
|
||||
{
|
||||
return mRequest.url( ).toString( );
|
||||
}
|
||||
|
||||
void QgsRequestHandler::setStatusCode( int code )
|
||||
{
|
||||
mResponse.setStatusCode( code );
|
||||
|
@ -104,6 +104,12 @@ class SERVER_EXPORT QgsRequestHandler
|
||||
//! Return response body data
|
||||
QByteArray body() const;
|
||||
|
||||
//! Return request POST data (can be null)
|
||||
QByteArray data() const;
|
||||
|
||||
//! Return request url
|
||||
QString url() const;
|
||||
|
||||
//! Set response http status code
|
||||
void setStatusCode( int code );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user