2017-06-26 09:57:09 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverrequest.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-14 12:43:00 +01:00
|
|
|
|
2016-12-07 22:09:57 +01:00
|
|
|
class QgsServerRequest
|
|
|
|
{
|
2017-06-26 09:57:09 +02:00
|
|
|
|
2016-12-07 22:09:57 +01:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsserverrequest.h"
|
|
|
|
%End
|
2016-12-14 21:46:00 +01:00
|
|
|
public:
|
2016-12-07 22:09:57 +01:00
|
|
|
|
2017-04-30 12:59:20 +02:00
|
|
|
typedef QMap<QString, QString> Parameters;
|
|
|
|
typedef QMap<QString, QString> Headers;
|
|
|
|
|
2016-12-15 22:02:35 +01:00
|
|
|
enum Method
|
|
|
|
{
|
2017-06-26 09:57:09 +02:00
|
|
|
HeadMethod,
|
|
|
|
PutMethod,
|
|
|
|
GetMethod,
|
|
|
|
PostMethod,
|
|
|
|
DeleteMethod
|
2016-12-14 21:46:00 +01:00
|
|
|
};
|
2016-12-07 22:09:57 +01:00
|
|
|
|
2017-01-04 01:13:14 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
QgsServerRequest();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2016-12-07 22:09:57 +01:00
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
QgsServerRequest( const QString &url, QgsServerRequest::Method method = QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers() );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor
|
2017-04-30 12:59:20 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param url: the url string
|
|
|
|
:param method: the request method
|
|
|
|
:param headers:
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-04-30 12:59:20 +02:00
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
QgsServerRequest( const QUrl &url, QgsServerRequest::Method method = QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers() );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor
|
2017-04-30 12:59:20 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param url: QUrl
|
|
|
|
:param method: the request method
|
|
|
|
:param headers:
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-04-30 12:59:20 +02:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
virtual ~QgsServerRequest();
|
2016-12-07 22:09:57 +01:00
|
|
|
|
2016-12-15 22:02:35 +01:00
|
|
|
QUrl url() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-05-27 17:04:31 +10:00
|
|
|
:return: the request url
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2016-12-14 21:46:00 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
QgsServerRequest::Method method() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:return: the request method
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2016-12-15 22:02:35 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
QgsServerRequest::Parameters parameters() const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns a map of query parameters with keys converted
|
2017-12-15 10:36:55 -04:00
|
|
|
to uppercase
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2016-12-14 21:46:00 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setParameter( const QString &key, const QString &value );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set a parameter
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-17 00:09:24 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
QString parameter( const QString &key ) const;
|
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets a parameter value
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-17 00:09:24 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void removeParameter( const QString &key );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove a parameter
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
QString header( const QString &name ) const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the header value
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param name: of the header
|
2018-04-02 22:46:47 +02:00
|
|
|
|
|
|
|
:return: the header value or an empty string
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setHeader( const QString &name, const QString &value );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set an header
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param name:
|
|
|
|
:param value:
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
QMap<QString, QString> headers() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the header map
|
2018-04-02 22:46:47 +02:00
|
|
|
|
|
|
|
:return: the headers map
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void removeHeader( const QString &name );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove an header
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param name:
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-17 00:09:24 +01:00
|
|
|
|
2016-12-14 21:46:00 +01:00
|
|
|
virtual QByteArray data() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns post/put data
|
2017-12-15 10:36:55 -04:00
|
|
|
Check for QByteArray.isNull() to check if data
|
|
|
|
is available.
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2016-12-07 22:09:57 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setUrl( const QUrl &url );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set the request url
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-04 01:13:14 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
void setMethod( QgsServerRequest::Method method );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set the request method
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-04 01:13:14 +01:00
|
|
|
|
2016-12-07 22:09:57 +01:00
|
|
|
};
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverrequest.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|