![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Upper Version Add PUT method Delete POST method
Dependencies: Adafruit_GFX MbedJSONValue_v102 WIZnetInterface mbed
Fork of WIZwiki-REST-io_v102 by
RequestHandler.cpp@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 | #include <stdio.h> |
joon874 | 0:5886f525a4ad | 2 | #include <stdlib.h> |
joon874 | 0:5886f525a4ad | 3 | #include <string.h> |
joon874 | 0:5886f525a4ad | 4 | #include "RequestHandler.h" |
joon874 | 0:5886f525a4ad | 5 | #include "MbedJSONValue.h" |
joon874 | 0:5886f525a4ad | 6 | |
joon874 | 0:5886f525a4ad | 7 | extern MbedJSONValue WIZwikiREST; |
joon874 | 0:5886f525a4ad | 8 | |
joon874 | 4:0b5a199e91f3 | 9 | MbedJSONValue* pDataJson = 0; |
joon874 | 4:0b5a199e91f3 | 10 | |
joon874 | 4:0b5a199e91f3 | 11 | void GetRequestHandler::handle(char* rest_uri, char* request_data, char *reply) |
joon874 | 0:5886f525a4ad | 12 | { |
joon874 | 0:5886f525a4ad | 13 | MbedJSONValue* tmpJson; |
joon874 | 0:5886f525a4ad | 14 | |
joon874 | 0:5886f525a4ad | 15 | char* tok; |
joon874 | 0:5886f525a4ad | 16 | char* last; |
joon874 | 2:ca36ecca24c2 | 17 | const char * pchar = 0; |
joon874 | 2:ca36ecca24c2 | 18 | #ifdef DEBUG_HTTPREQ |
joon874 | 0:5886f525a4ad | 19 | printf("GetRequestHandler():%s\r\n",rest_uri); |
joon874 | 2:ca36ecca24c2 | 20 | #endif |
joon874 | 4:0b5a199e91f3 | 21 | if(!strcmp(rest_uri, "/")){ |
joon874 | 2:ca36ecca24c2 | 22 | tmpJson = &WIZwikiREST; |
joon874 | 0:5886f525a4ad | 23 | } |
joon874 | 4:0b5a199e91f3 | 24 | else{ |
joon874 | 4:0b5a199e91f3 | 25 | tok = strtok_r(rest_uri+1, "/", &last); |
joon874 | 0:5886f525a4ad | 26 | tmpJson = &WIZwikiREST; |
joon874 | 2:ca36ecca24c2 | 27 | |
joon874 | 2:ca36ecca24c2 | 28 | char* name = 0; |
joon874 | 2:ca36ecca24c2 | 29 | while(tok) |
joon874 | 2:ca36ecca24c2 | 30 | { |
joon874 | 2:ca36ecca24c2 | 31 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 32 | printf("tok = %s \r\n", tok); |
joon874 | 2:ca36ecca24c2 | 33 | #endif |
joon874 | 4:0b5a199e91f3 | 34 | if(tmpJson->hasMember(tok)){ |
joon874 | 2:ca36ecca24c2 | 35 | tmpJson = &((*tmpJson)[tok]); |
joon874 | 2:ca36ecca24c2 | 36 | name = tok; |
joon874 | 2:ca36ecca24c2 | 37 | tok = strtok_r(0, "/", &last); |
joon874 | 2:ca36ecca24c2 | 38 | } |
joon874 | 4:0b5a199e91f3 | 39 | else{ |
joon874 | 2:ca36ecca24c2 | 40 | #ifdef DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 41 | printf("No Member\r\n"); |
joon874 | 2:ca36ecca24c2 | 42 | #endif |
joon874 | 2:ca36ecca24c2 | 43 | break; |
joon874 | 2:ca36ecca24c2 | 44 | } |
joon874 | 2:ca36ecca24c2 | 45 | } |
joon874 | 4:0b5a199e91f3 | 46 | if(name){ |
joon874 | 4:0b5a199e91f3 | 47 | if(tok){ |
joon874 | 4:0b5a199e91f3 | 48 | if(tmpJson->accessible){ |
joon874 | 2:ca36ecca24c2 | 49 | #ifdef DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 50 | printf("accessible : tmpJson->size()=%d\r\n",tmpJson->size()); |
joon874 | 2:ca36ecca24c2 | 51 | #endif |
joon874 | 2:ca36ecca24c2 | 52 | |
joon874 | 4:0b5a199e91f3 | 53 | if(tmpJson->size() > 0){ |
joon874 | 2:ca36ecca24c2 | 54 | *tmpJson = std::string(tok); |
joon874 | 2:ca36ecca24c2 | 55 | tmpJson->cb_action((void*)tok); |
joon874 | 2:ca36ecca24c2 | 56 | #ifdef DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 57 | printf("set string:%s\r\n",tok); |
joon874 | 2:ca36ecca24c2 | 58 | #endif |
joon874 | 2:ca36ecca24c2 | 59 | } |
joon874 | 4:0b5a199e91f3 | 60 | else{ |
joon874 | 2:ca36ecca24c2 | 61 | *tmpJson = atoi(tok); |
joon874 | 2:ca36ecca24c2 | 62 | tmpJson->cb_action(&tmpJson->_value); |
joon874 | 2:ca36ecca24c2 | 63 | #ifdef DEBUG_HTTPREQ |
joon874 | 2:ca36ecca24c2 | 64 | printf("set int:%d\r\n",atoi(tok)); |
joon874 | 2:ca36ecca24c2 | 65 | #endif |
joon874 | 2:ca36ecca24c2 | 66 | } |
joon874 | 2:ca36ecca24c2 | 67 | } |
joon874 | 4:0b5a199e91f3 | 68 | else{ |
joon874 | 2:ca36ecca24c2 | 69 | strcpy (reply, "HTTP/1.1 403 OK\r\n"); |
joon874 | 2:ca36ecca24c2 | 70 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 2:ca36ecca24c2 | 71 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 2:ca36ecca24c2 | 72 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", 26+4); |
joon874 | 2:ca36ecca24c2 | 73 | strcat(reply, "{\"Result : No Accessible\"}"); |
joon874 | 2:ca36ecca24c2 | 74 | strcat (reply, "\r\n\r\n"); |
joon874 | 2:ca36ecca24c2 | 75 | return; |
joon874 | 2:ca36ecca24c2 | 76 | } |
joon874 | 2:ca36ecca24c2 | 77 | } |
MidnightCow | 1:728e5b5c8dae | 78 | } |
joon874 | 4:0b5a199e91f3 | 79 | else{ |
joon874 | 2:ca36ecca24c2 | 80 | strcpy (reply, "HTTP/1.1 404 OK\r\n"); |
joon874 | 2:ca36ecca24c2 | 81 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 2:ca36ecca24c2 | 82 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 2:ca36ecca24c2 | 83 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", 33+4); |
joon874 | 2:ca36ecca24c2 | 84 | strcat(reply, "{\"Result\" : \"No defined Resource\"}"); |
joon874 | 2:ca36ecca24c2 | 85 | strcat (reply, "\r\n\r\n"); |
joon874 | 2:ca36ecca24c2 | 86 | return; |
joon874 | 0:5886f525a4ad | 87 | } |
MidnightCow | 1:728e5b5c8dae | 88 | } |
joon874 | 2:ca36ecca24c2 | 89 | pchar = (*tmpJson).serialize().c_str(); |
joon874 | 2:ca36ecca24c2 | 90 | strcpy (reply, "HTTP/1.1 200 OK\r\n"); |
joon874 | 2:ca36ecca24c2 | 91 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 2:ca36ecca24c2 | 92 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 2:ca36ecca24c2 | 93 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", strlen(pchar)+4); |
joon874 | 2:ca36ecca24c2 | 94 | strcat (reply, pchar); |
joon874 | 2:ca36ecca24c2 | 95 | strcat (reply, "\r\n\r\n"); |
joon874 | 2:ca36ecca24c2 | 96 | |
MidnightCow | 1:728e5b5c8dae | 97 | return; |
joon874 | 0:5886f525a4ad | 98 | } |
joon874 | 0:5886f525a4ad | 99 | |
joon874 | 4:0b5a199e91f3 | 100 | void PostRequestHandler::handle(char* rest_uri, char* request_data, char *reply) |
joon874 | 4:0b5a199e91f3 | 101 | { |
joon874 | 4:0b5a199e91f3 | 102 | MbedJSONValue* tmpJson; |
joon874 | 4:0b5a199e91f3 | 103 | char* tok; |
joon874 | 4:0b5a199e91f3 | 104 | char* last; |
joon874 | 4:0b5a199e91f3 | 105 | int errnum = 200; |
joon874 | 4:0b5a199e91f3 | 106 | |
joon874 | 4:0b5a199e91f3 | 107 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 108 | printf("PostRequestHandler():%s\r\n",request_data+4); |
joon874 | 4:0b5a199e91f3 | 109 | #endif |
joon874 | 4:0b5a199e91f3 | 110 | if(!pDataJson){ |
joon874 | 4:0b5a199e91f3 | 111 | pDataJson = new MbedJSONValue(); |
joon874 | 4:0b5a199e91f3 | 112 | } |
joon874 | 4:0b5a199e91f3 | 113 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 114 | printf("Before Parse\r\n"); |
joon874 | 4:0b5a199e91f3 | 115 | debug_info(); |
joon874 | 4:0b5a199e91f3 | 116 | #endif |
joon874 | 4:0b5a199e91f3 | 117 | parse(*pDataJson,(const char*)request_data); |
joon874 | 4:0b5a199e91f3 | 118 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 119 | printf("After Parse\r\n"); |
joon874 | 4:0b5a199e91f3 | 120 | debug_info(); |
joon874 | 4:0b5a199e91f3 | 121 | printf("DataJson._type=%d\r\n",pDataJson->_type); |
joon874 | 4:0b5a199e91f3 | 122 | printf("DataJson=%s\r\n",pDataJson->serialize().c_str()); |
joon874 | 4:0b5a199e91f3 | 123 | printf("DataJson.size()=%d\r\n",pDataJson->size()); |
joon874 | 4:0b5a199e91f3 | 124 | printf("DataJason.type=%d\r\n",pDataJson->_type); |
joon874 | 4:0b5a199e91f3 | 125 | #endif |
joon874 | 4:0b5a199e91f3 | 126 | |
joon874 | 4:0b5a199e91f3 | 127 | if(!strcmp(rest_uri, "/")){ |
joon874 | 4:0b5a199e91f3 | 128 | tmpJson = &WIZwikiREST; |
joon874 | 4:0b5a199e91f3 | 129 | } |
joon874 | 4:0b5a199e91f3 | 130 | else{ |
joon874 | 4:0b5a199e91f3 | 131 | tok = strtok_r(rest_uri+1, "/", &last); |
joon874 | 4:0b5a199e91f3 | 132 | tmpJson = &WIZwikiREST; |
joon874 | 4:0b5a199e91f3 | 133 | |
joon874 | 4:0b5a199e91f3 | 134 | char* name = 0; |
joon874 | 4:0b5a199e91f3 | 135 | while(tok) |
joon874 | 4:0b5a199e91f3 | 136 | { |
joon874 | 4:0b5a199e91f3 | 137 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 138 | printf("tok = %s \r\n", tok); |
joon874 | 4:0b5a199e91f3 | 139 | #endif |
joon874 | 4:0b5a199e91f3 | 140 | if(tmpJson->hasMember(tok)){ |
joon874 | 4:0b5a199e91f3 | 141 | tmpJson = &((*tmpJson)[tok]); |
joon874 | 4:0b5a199e91f3 | 142 | name = tok; |
joon874 | 4:0b5a199e91f3 | 143 | tok = strtok_r(0, "/", &last); |
joon874 | 4:0b5a199e91f3 | 144 | } |
joon874 | 4:0b5a199e91f3 | 145 | else{ |
joon874 | 4:0b5a199e91f3 | 146 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 147 | printf("No Member\r\n"); |
joon874 | 4:0b5a199e91f3 | 148 | #endif |
joon874 | 4:0b5a199e91f3 | 149 | break; |
joon874 | 4:0b5a199e91f3 | 150 | } |
joon874 | 4:0b5a199e91f3 | 151 | } |
joon874 | 4:0b5a199e91f3 | 152 | if(name){ |
joon874 | 4:0b5a199e91f3 | 153 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 154 | printf("Token_name=%s\r\n",name); |
joon874 | 4:0b5a199e91f3 | 155 | #endif |
joon874 | 4:0b5a199e91f3 | 156 | if(tok){ |
joon874 | 4:0b5a199e91f3 | 157 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 158 | printf("It should be no parameters : tok=%s\r\n",tok); |
joon874 | 4:0b5a199e91f3 | 159 | #endif |
joon874 | 4:0b5a199e91f3 | 160 | errnum = 403; |
joon874 | 4:0b5a199e91f3 | 161 | } |
joon874 | 4:0b5a199e91f3 | 162 | } |
joon874 | 4:0b5a199e91f3 | 163 | else{ |
joon874 | 4:0b5a199e91f3 | 164 | errnum = 404; |
joon874 | 4:0b5a199e91f3 | 165 | } |
joon874 | 4:0b5a199e91f3 | 166 | } |
joon874 | 4:0b5a199e91f3 | 167 | if(errnum != 0){ |
joon874 | 4:0b5a199e91f3 | 168 | switch(pDataJson->_type) |
joon874 | 4:0b5a199e91f3 | 169 | { |
joon874 | 4:0b5a199e91f3 | 170 | case MbedJSONValue::TypeInt: |
joon874 | 4:0b5a199e91f3 | 171 | if(tmpJson->accessible){ |
joon874 | 4:0b5a199e91f3 | 172 | *tmpJson = pDataJson->_value.asInt; |
joon874 | 4:0b5a199e91f3 | 173 | tmpJson->cb_action(&tmpJson->_value); |
joon874 | 4:0b5a199e91f3 | 174 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 175 | printf("set int:%d\r\n",atoi(tok)); |
joon874 | 4:0b5a199e91f3 | 176 | #endif |
joon874 | 4:0b5a199e91f3 | 177 | } |
joon874 | 4:0b5a199e91f3 | 178 | else{ |
joon874 | 4:0b5a199e91f3 | 179 | errnum = 403; |
joon874 | 4:0b5a199e91f3 | 180 | } |
joon874 | 4:0b5a199e91f3 | 181 | break; |
joon874 | 4:0b5a199e91f3 | 182 | |
joon874 | 4:0b5a199e91f3 | 183 | case MbedJSONValue::TypeString: |
joon874 | 4:0b5a199e91f3 | 184 | if(tmpJson->accessible){ |
joon874 | 4:0b5a199e91f3 | 185 | *tmpJson = pDataJson->_value.asString; |
joon874 | 4:0b5a199e91f3 | 186 | } |
joon874 | 4:0b5a199e91f3 | 187 | else{ |
joon874 | 4:0b5a199e91f3 | 188 | errnum = 403; |
joon874 | 4:0b5a199e91f3 | 189 | } |
joon874 | 4:0b5a199e91f3 | 190 | break; |
joon874 | 4:0b5a199e91f3 | 191 | |
joon874 | 4:0b5a199e91f3 | 192 | case MbedJSONValue::TypeObject: |
joon874 | 4:0b5a199e91f3 | 193 | for(int i = 0; i < pDataJson->index_token; i++) |
joon874 | 4:0b5a199e91f3 | 194 | { |
joon874 | 4:0b5a199e91f3 | 195 | tok = (char*)pDataJson->token_name[i]->c_str(); |
joon874 | 4:0b5a199e91f3 | 196 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 197 | printf("pDataJson.token_name[%d]->c_str()=%s\r\n",i,tok); |
joon874 | 4:0b5a199e91f3 | 198 | #endif |
joon874 | 4:0b5a199e91f3 | 199 | if(tmpJson->hasMember(tok)){ |
joon874 | 4:0b5a199e91f3 | 200 | if((*tmpJson)[tok].accessible){ |
joon874 | 4:0b5a199e91f3 | 201 | errnum = 200; |
joon874 | 4:0b5a199e91f3 | 202 | if((*pDataJson)[i].size() > 0){ |
joon874 | 4:0b5a199e91f3 | 203 | (*tmpJson)[tok] = (*pDataJson)[i]._value.asString; |
joon874 | 4:0b5a199e91f3 | 204 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 205 | printf("String Updated: %s : %s\r\n", tok,(*tmpJson)[tok].get<std::string>().c_str()); |
joon874 | 4:0b5a199e91f3 | 206 | #endif |
joon874 | 4:0b5a199e91f3 | 207 | } |
joon874 | 4:0b5a199e91f3 | 208 | else{ |
joon874 | 4:0b5a199e91f3 | 209 | (*tmpJson)[tok] = (*pDataJson)[i]._value.asInt; |
joon874 | 4:0b5a199e91f3 | 210 | (*tmpJson)[tok].cb_action((void*)&((*pDataJson)[i]._value.asInt)); |
joon874 | 4:0b5a199e91f3 | 211 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 212 | printf("Int Updated: %s : %d\r\n", tok,(*tmpJson)[tok].get<int>()); |
joon874 | 4:0b5a199e91f3 | 213 | #endif |
joon874 | 4:0b5a199e91f3 | 214 | } |
joon874 | 4:0b5a199e91f3 | 215 | } |
joon874 | 4:0b5a199e91f3 | 216 | else{ |
joon874 | 4:0b5a199e91f3 | 217 | errnum = 403; break; |
joon874 | 4:0b5a199e91f3 | 218 | } |
joon874 | 4:0b5a199e91f3 | 219 | } |
joon874 | 4:0b5a199e91f3 | 220 | else{ |
joon874 | 4:0b5a199e91f3 | 221 | errnum = 404; break; |
joon874 | 4:0b5a199e91f3 | 222 | } |
joon874 | 4:0b5a199e91f3 | 223 | } |
joon874 | 4:0b5a199e91f3 | 224 | break; |
joon874 | 4:0b5a199e91f3 | 225 | |
joon874 | 4:0b5a199e91f3 | 226 | default: |
joon874 | 4:0b5a199e91f3 | 227 | errnum = 403; break; |
joon874 | 4:0b5a199e91f3 | 228 | } |
joon874 | 4:0b5a199e91f3 | 229 | } |
joon874 | 4:0b5a199e91f3 | 230 | |
joon874 | 4:0b5a199e91f3 | 231 | switch(errnum) |
joon874 | 4:0b5a199e91f3 | 232 | { |
joon874 | 4:0b5a199e91f3 | 233 | case 403: |
joon874 | 4:0b5a199e91f3 | 234 | strcpy (reply, "HTTP/1.1 403 OK\r\n"); |
joon874 | 4:0b5a199e91f3 | 235 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 4:0b5a199e91f3 | 236 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 4:0b5a199e91f3 | 237 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", 26+4); |
joon874 | 4:0b5a199e91f3 | 238 | strcat(reply, "{\"Result : No Accessible\"}"); |
joon874 | 4:0b5a199e91f3 | 239 | strcat (reply, "\r\n\r\n"); |
joon874 | 4:0b5a199e91f3 | 240 | break; |
joon874 | 4:0b5a199e91f3 | 241 | |
joon874 | 4:0b5a199e91f3 | 242 | case 404: |
joon874 | 4:0b5a199e91f3 | 243 | strcpy (reply, "HTTP/1.1 404 OK\r\n"); |
joon874 | 4:0b5a199e91f3 | 244 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 4:0b5a199e91f3 | 245 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 4:0b5a199e91f3 | 246 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", 33+4); |
joon874 | 4:0b5a199e91f3 | 247 | strcat(reply, "{\"Result\" : \"No defined Resource\"}"); |
joon874 | 4:0b5a199e91f3 | 248 | strcat (reply, "\r\n\r\n"); |
joon874 | 4:0b5a199e91f3 | 249 | break; |
joon874 | 4:0b5a199e91f3 | 250 | |
joon874 | 4:0b5a199e91f3 | 251 | case 200: |
joon874 | 4:0b5a199e91f3 | 252 | strcpy (reply, "HTTP/1.1 200 OK\r\n"); |
joon874 | 4:0b5a199e91f3 | 253 | strcat (reply, "Sever: WIZwiki-REST\r\n"); |
joon874 | 4:0b5a199e91f3 | 254 | strcat (reply, "content-Type: text/json\r\n"); |
joon874 | 4:0b5a199e91f3 | 255 | sprintf(reply + strlen(reply), "Content-Length: %d\r\n\r\n", 15+4); |
joon874 | 4:0b5a199e91f3 | 256 | strcat (reply, "{\"Result\":\"OK\"}"); |
joon874 | 4:0b5a199e91f3 | 257 | strcat (reply, "\r\n\r\n"); |
joon874 | 4:0b5a199e91f3 | 258 | break; |
joon874 | 4:0b5a199e91f3 | 259 | } |
joon874 | 4:0b5a199e91f3 | 260 | |
joon874 | 4:0b5a199e91f3 | 261 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 262 | printf("Before Delete\r\n"); |
joon874 | 4:0b5a199e91f3 | 263 | debug_info(); |
joon874 | 4:0b5a199e91f3 | 264 | #endif |
joon874 | 4:0b5a199e91f3 | 265 | if(pDataJson){ |
joon874 | 4:0b5a199e91f3 | 266 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 267 | printf("type;%d, pDataJson->index_token=%d\r\n",pDataJson->_type,pDataJson->index_token); |
joon874 | 4:0b5a199e91f3 | 268 | #endif |
joon874 | 4:0b5a199e91f3 | 269 | delete pDataJson; |
joon874 | 4:0b5a199e91f3 | 270 | pDataJson = 0; |
joon874 | 4:0b5a199e91f3 | 271 | } |
joon874 | 4:0b5a199e91f3 | 272 | #ifdef DEBUG_HTTPREQ |
joon874 | 4:0b5a199e91f3 | 273 | printf("After Delete\r\n"); |
joon874 | 4:0b5a199e91f3 | 274 | debug_info(); |
joon874 | 4:0b5a199e91f3 | 275 | #endif |
joon874 | 4:0b5a199e91f3 | 276 | } |
joon874 | 4:0b5a199e91f3 | 277 | |
joon874 | 4:0b5a199e91f3 | 278 | /* |
joon874 | 4:0b5a199e91f3 | 279 | void PutRequestHandler::handle(char* rest_uri, char* request_data, char *reply) |
joon874 | 0:5886f525a4ad | 280 | { |
joon874 | 0:5886f525a4ad | 281 | } |
joon874 | 0:5886f525a4ad | 282 | |
joon874 | 4:0b5a199e91f3 | 283 | void DeleteRequestHandler::handle(char* rest_uri, char* request_data, char *reply) |
joon874 | 0:5886f525a4ad | 284 | { |
joon874 | 0:5886f525a4ad | 285 | } |
joon874 | 4:0b5a199e91f3 | 286 | */ |