MCPcopy Create free account
hub / github.com/SmingHub/Sming / setCookie

Method setCookie

Sming/Components/Network/src/Network/Http/HttpResponse.cpp:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include <esp_systemapi.h>
18
19HttpResponse* 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
33HttpResponse* HttpResponse::setCache(int maxAgeSeconds, bool isPublic)
34{

Callers 1

onHelloFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected