Files
GoldenCheetah/httpserver/httprequesthandler.cpp
Mark Liversedge 30d488ce72 Add httpserver to contrib
.. see http://stefanfrings.de/qtwebapp/index-en.html

.. this is a lightweight web server to allow GC to
   provide webservices.

.. we will be providing web services on localhost to
   enable R integration.

.. we will use web services to standardise the
   interface to provide something we can use in R
   but also anything else at a later date.

.. gcconfig.pri contains $$HTPATH that points to
   the location of the code, if it is not set then
   the web server is not compiled in.
2015-09-05 20:40:38 +01:00

20 lines
593 B
C++

/**
@file
@author Stefan Frings
*/
#include "httprequesthandler.h"
HttpRequestHandler::HttpRequestHandler(QObject* parent)
: QObject(parent)
{}
HttpRequestHandler::~HttpRequestHandler() {}
void HttpRequestHandler::service(HttpRequest& request, HttpResponse& response) {
qCritical("HttpRequestHandler: you need to override the service() function");
qDebug("HttpRequestHandler: request=%s %s %s",request.getMethod().data(),request.getPath().data(),request.getVersion().data());
response.setStatus(501,"not implemented");
response.write("501 not implemented",true);
}