| 17 | #include <esp_systemapi.h> |
| 18 | |
| 19 | HttpResponse* HttpResponse::setCookie(const String& name, const String& value, bool append) |
| 20 | { |
| 21 | String s = name; |
| 22 | s += '='; |
| 23 | s += value; |
| 24 | if(append) { |
| 25 | headers.append(HTTP_HEADER_SET_COOKIE, s); |
| 26 | } else { |
| 27 | headers[HTTP_HEADER_SET_COOKIE] = s; |
| 28 | } |
| 29 | |
| 30 | return this; |
| 31 | } |
| 32 | |
| 33 | HttpResponse* HttpResponse::setCache(int maxAgeSeconds, bool isPublic) |
| 34 | { |