![](/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@9:f7d5a168a693, 2016-10-06 (annotated)
- Committer:
- joon874
- Date:
- Thu Oct 06 04:13:57 2016 +0000
- Revision:
- 9:f7d5a168a693
- Parent:
- 8:60d99da6eeb2
WIZwikiREST-io code exercise for WIZnet Academy
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 | 5:473a66ae9596 | 4 | #define DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 5 | |
joon874 | 9:f7d5a168a693 | 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 | 8:60d99da6eeb2 | 21 | /* |
joon874 | 4:0b5a199e91f3 | 22 | class PostRequestHandler : public RequestHandler |
joon874 | 4:0b5a199e91f3 | 23 | { |
joon874 | 4:0b5a199e91f3 | 24 | public : |
joon874 | 4:0b5a199e91f3 | 25 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 4:0b5a199e91f3 | 26 | |
joon874 | 4:0b5a199e91f3 | 27 | }; |
joon874 | 8:60d99da6eeb2 | 28 | */ |
joon874 | 4:0b5a199e91f3 | 29 | |
joon874 | 0:5886f525a4ad | 30 | class PutRequestHandler : public RequestHandler |
joon874 | 0:5886f525a4ad | 31 | { |
joon874 | 0:5886f525a4ad | 32 | public : |
joon874 | 4:0b5a199e91f3 | 33 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 0:5886f525a4ad | 34 | |
joon874 | 0:5886f525a4ad | 35 | }; |
joon874 | 8:60d99da6eeb2 | 36 | |
joon874 | 0:5886f525a4ad | 37 | |
joon874 | 4:0b5a199e91f3 | 38 | /* |
joon874 | 0:5886f525a4ad | 39 | class DeleteRequestHandler : public RequestHandler |
joon874 | 0:5886f525a4ad | 40 | { |
joon874 | 0:5886f525a4ad | 41 | public : |
joon874 | 4:0b5a199e91f3 | 42 | virtual void handle(char* rest_uri, char* req_data, char* reply); |
joon874 | 0:5886f525a4ad | 43 | |
joon874 | 0:5886f525a4ad | 44 | }; |
joon874 | 4:0b5a199e91f3 | 45 | */ |
joon874 | 4:0b5a199e91f3 | 46 | |
joon874 | 0:5886f525a4ad | 47 | #endif |