mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
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.
This commit is contained in:
19
httpserver/httprequesthandler.cpp
Normal file
19
httpserver/httprequesthandler.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
@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);
|
||||
}
|
||||
Reference in New Issue
Block a user