HttpResource.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * HttpResource.h
8  *
9  * @author: 2017 - Slavey Karadzhov <slav@attachix.com>
10  *
11  ****/
12 
13 #pragma once
14 
15 #include "WString.h"
16 #include "Data/ObjectMap.h"
17 
18 #include "HttpResponse.h"
19 #include "HttpRequest.h"
20 
22 
29 
35 {
36 public:
37  virtual ~HttpResource()
38  {
39  }
40 
44  virtual void shutdown(HttpServerConnection& connection)
45  {
46  }
47 
48 public:
53 };
HttpResourceDelegate onRequestComplete
request is complete OR upgraded
Definition: HttpResource.h:51
Definition: HttpServerConnection.h:33
virtual ~HttpResource()
Definition: HttpResource.h:37
Instances of this class are registered with an HttpServer for a specific URL.
Definition: HttpResource.h:34
HttpServerConnectionUpgradeDelegate onUpgrade
request is upgraded and raw data is passed to it
Definition: HttpResource.h:52
virtual void shutdown(HttpServerConnection &connection)
Takes care to cleanup the connection.
Definition: HttpResource.h:44
HttpServerConnectionBodyDelegate onBody
resource wants to process the raw body data
Definition: HttpResource.h:49
HttpResourceDelegate onHeadersComplete
headers are ready
Definition: HttpResource.h:50