[379103]: src / org / esb / api / UrlHandler.h  Maximize  Restore  History

Download this file

45 lines (37 with data), 917 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* File: UrlHandler.h
* Author: HoelscJ
*
* Created on 12. Juli 2011, 11:35
*/
#ifndef URLHANDLER_H
#define URLHANDLER_H
#include "string"
#include "org/esb/libjson/libjson.h"
#include "mongoose.h"
namespace org {
namespace esb {
namespace api {
class UrlHandler {
public:
virtual std::string getUrlToHandle() {
return "";
}
virtual JSONNode handle(const struct mg_request_info *request_info, bool & status) {
return JSONNode(JSON_NODE);
};
std::string getParameter(std::string key, char * query) {
std::string result;
if (query!=NULL) {
char data[255];
mg_get_var(query, strlen(query), key.c_str(), data, sizeof (data));
result=data;
//LOGDEBUG("DataId" << iddata);
}
return result;
}
};
}
}
}
#endif /* URLHANDLER_H */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks