summaryrefslogtreecommitdiff
path: root/lib/httpserver/HTTPResponse.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-07-31 06:40:09 +0000
committerChris Wilson <chris+github@qwirx.com>2015-07-31 06:40:09 +0000
commitd72425de59db7d94dd51cca7988c3d025426925b (patch)
tree2545bc5321aedcfd962422277697e39f1f552ecc /lib/httpserver/HTTPResponse.h
parent762af2a462607258817fde3dc919ee7db5d1bcf0 (diff)
Add utility methods to HTTPRequest and HTTPResponse classes.
Allow getting method name of an HTTPRequest, and connection open/closed status of an HTTPResponse.
Diffstat (limited to 'lib/httpserver/HTTPResponse.h')
-rw-r--r--lib/httpserver/HTTPResponse.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/httpserver/HTTPResponse.h b/lib/httpserver/HTTPResponse.h
index 04051958..978fa91e 100644
--- a/lib/httpserver/HTTPResponse.h
+++ b/lib/httpserver/HTTPResponse.h
@@ -63,7 +63,7 @@ public:
typedef std::pair<std::string, std::string> Header;
void SetResponseCode(int Code);
- int GetResponseCode() { return mResponseCode; }
+ int GetResponseCode() const { return mResponseCode; }
void SetContentType(const char *ContentType);
const std::string& GetContentType() { return mContentType; }
@@ -107,6 +107,7 @@ public:
void SetResponseIsDynamicContent(bool IsDynamic) {mResponseIsDynamicContent = IsDynamic;}
// Set keep alive control, default is to mark as to be closed
void SetKeepAlive(bool KeepAlive) {mKeepAlive = KeepAlive;}
+ bool IsKeepAlive() {return mKeepAlive;}
void SetCookie(const char *Name, const char *Value, const char *Path = "/", int ExpiresAt = 0);