![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
WIZwikiREST-io exercise code for WIZnet Academy
Dependencies: MbedJSONValue_v102 WIZnetInterface mbed
Fork of WIZwiki-REST-io_v103 by
RequestHandler.h@4:0b5a199e91f3, 2016-05-31 (annotated)
- Committer:
- joon874
- Date:
- Tue May 31 10:31:30 2016 +0000
- Revision:
- 4:0b5a199e91f3
- Parent:
- 2:ca36ecca24c2
- Child:
- 5:473a66ae9596
WIZwiki-REST-io ver.2 ; Add POST Method
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joon874 | 0:5886f525a4ad | 1 | #ifndef __REQUESTHANDLER_H_ |
joon874 | 0:5886f525a4ad | 2 | #define __REQUESTHANDLER_H_ |
joon874 | 0:5886f525a4ad | 3 | |
joon874 | 2:ca36ecca24c2 | 4 | //#define DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 5 | |
joon874 | 4:0b5a199e91f3 | 6 | extern void debug_info(); |
joon874 | 4:0b5a199e91f3 | 7 | |
joon874 | 0:5886f525a4ad | 8 | class RequestHandler |
joon874 | 0:5886f525a4ad | 9 | { |
joon874 | 0:5886f525a4ad | 10 | public : |
joon874 | 4:0b5a199e91f3 | 11 | virtual void handle(char* rest_uri, char* req_data, char* reply) = 0; |
joon874 | 0:5886f525a4ad | 12 | }; |
joon874 | 0:5886f525a4ad | 13 | |
joon874 | 0:5886f525a4ad | 14 | class GetRequestHandler : public RequestHandler |
joon874 | 0:5886f525a4ad | 15 | { |
joon874 | 0:5886f525a4ad | 16 | public : |
joon874 | 4:0b5a199e91f3 | 17 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 4:0b5a199e91f3 | 18 | |
joon874 | 0:5886f525a4ad | 19 | }; |
joon874 | 0:5886f525a4ad | 20 | |
joon874 | 4:0b5a199e91f3 | 21 | class PostRequestHandler : public RequestHandler |
joon874 | 4:0b5a199e91f3 | 22 | { |
joon874 | 4:0b5a199e91f3 | 23 | public : |
joon874 | 4:0b5a199e91f3 | 24 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 4:0b5a199e91f3 | 25 | |
joon874 | 4:0b5a199e91f3 | 26 | }; |
joon874 | 4:0b5a199e91f3 | 27 | |
joon874 | 4:0b5a199e91f3 | 28 | /* |
joon874 | 0:5886f525a4ad | 29 | class PutRequestHandler : public RequestHandler |
joon874 | 0:5886f525a4ad | 30 | { |
joon874 | 0:5886f525a4ad | 31 | public : |
joon874 | 4:0b5a199e91f3 | 32 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 0:5886f525a4ad | 33 | |
joon874 | 0:5886f525a4ad | 34 | }; |
joon874 | 4:0b5a199e91f3 | 35 | */ |
joon874 | 0:5886f525a4ad | 36 | |
joon874 | 4:0b5a199e91f3 | 37 | /* |
joon874 | 0:5886f525a4ad | 38 | class DeleteRequestHandler : public RequestHandler |
joon874 | 0:5886f525a4ad | 39 | { |
joon874 | 0:5886f525a4ad | 40 | public : |
joon874 | 4:0b5a199e91f3 | 41 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 0:5886f525a4ad | 42 | |
joon874 | 0:5886f525a4ad | 43 | }; |
joon874 | 4:0b5a199e91f3 | 44 | */ |
joon874 | 4:0b5a199e91f3 | 45 | |
joon874 | 0:5886f525a4ad | 46 | #endif |