summaryrefslogtreecommitdiff
path: root/includes/Http.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-18 22:52:12 -0800
committerPixel <pixel@nobis-crew.org>2011-11-18 22:52:12 -0800
commit0f0db0ee56b69d580fe66528a379fb08d714bf4d (patch)
treebf55d752c095838644e50b9bd762538cd9eaa447 /includes/Http.h
parent52f7b28073501242dacd6409bb649fc2182cc777 (diff)
Starting to re-organize the HTTP code a bit. Sharing code between the server and a potential client makes sense. Also packing requests and responses into structures / classes is probably a good idea.
Diffstat (limited to 'includes/Http.h')
-rw-r--r--includes/Http.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/Http.h b/includes/Http.h
index cbb118f..cd7973f 100644
--- a/includes/Http.h
+++ b/includes/Http.h
@@ -1,9 +1,27 @@
#pragma once
+#include <map>
+#include <BString.h>
+#include <Handle.h>
+
namespace Balau {
namespace Http {
+typedef std::map<String, String> StringMap;
+typedef std::map<String, IO<Handle> > FileList;
+
+class Request {
+ public:
+ int method;
+ String host;
+ String uri;
+ StringMap variables;
+ StringMap headers;
+ FileList files;
+ bool persistent;
+};
+
enum {
GET,
POST,