Skip to content

Commit

Permalink
Add postrequesthandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Hugentobler committed Jun 18, 2011
1 parent 783b30e commit 2a05b54
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/mapserver/qgspostrequesthandler.cpp
@@ -0,0 +1,20 @@
#include "qgspostrequesthandler.h"
#include "qgslogger.h"

QgsPostRequestHandler::QgsPostRequestHandler()
{
}

QgsPostRequestHandler::~QgsPostRequestHandler()
{
}

std::map<QString, QString> QgsPostRequestHandler::parseInput()
{
QgsDebugMsg("QgsPostRequestHandler::parseInput");
std::map<QString, QString> parameters;
QString inputString = readPostBody();
QgsDebugMsg(inputString);
requestStringToParameterMap( inputString, parameters );
return parameters;
}
17 changes: 17 additions & 0 deletions src/mapserver/qgspostrequesthandler.h
@@ -0,0 +1,17 @@
#ifndef QGSPOSTREQUESTHANDLER_H
#define QGSPOSTREQUESTHANDLER_H

#include "qgshttprequesthandler.h"

/**Request handler for HTTP POST*/
class QgsPostRequestHandler: public QgsHttpRequestHandler
{
public:
QgsPostRequestHandler();
~QgsPostRequestHandler();

/**Parses the input and creates a request neutral Parameter/Value map*/
std::map<QString, QString> parseInput();
};

#endif // QGSPOSTREQUESTHANDLER_H

0 comments on commit 2a05b54

Please sign in to comment.