@@ -62,6 +62,7 @@ class QgsRequestHandler
62
62
virtual void appendBody ( const QByteArray &body ) = 0;
63
63
/* *Clears the response body*/
64
64
virtual void clearBody ( ) = 0;
65
+ virtual QByteArray* body ( ) { return &mBody ; }
65
66
virtual void setInfoFormat ( const QString &format ) = 0;
66
67
/* *Send out HTTP headers and flush output buffer*/
67
68
virtual void sendResponse ( ) = 0;
@@ -76,12 +77,14 @@ class QgsRequestHandler
76
77
virtual QString parameter ( const QString &key ) const = 0;
77
78
QString format () const { return mFormat ; }
78
79
bool headersSent () { return mHeadersSent ; }
80
+ QString infoFormat () const { return mInfoFormat ; }
79
81
80
82
protected:
81
83
82
84
virtual void sendHeaders ( ) = 0;
83
85
virtual void sendBody ( ) const = 0;
84
86
/* *This is set by the parseInput methods of the subclasses (parameter FORMAT, e.g. 'FORMAT=PNG')*/
87
+ QByteArray mBody ; // The response payload
85
88
QString mFormat ;
86
89
QString mFormatString ; // format string as it is passed in the request (with base)
87
90
bool mHeadersSent ;
@@ -92,6 +95,7 @@ class QgsRequestHandler
92
95
/* * Response headers. They can be empty, in this case headers are
93
96
automatically generated from the content mFormat */
94
97
QMap<QString, QString> mHeaders ;
98
+
95
99
};
96
100
97
101
#endif
0 commit comments