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

Method append

Sming/Components/Network/src/Network/Http/HttpHeaders.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool HttpHeaders::append(const HttpHeaderFieldName& name, const String& value)
43{
44 int i = indexOf(name);
45 if(i < 0) {
46 operator[](name) = value;
47 return true;
48 }
49
50 if(!getFlags(name)[Flag::Multi]) {
51 debug_w("[HTTP] Append not supported for header field '%s'", toString(name).c_str());
52 return false;
53 }
54
55 valueAt(i) += '\0' + value;
56
57 return true;
58}
59
60void HttpHeaders::setMultiple(const HttpHeaders& headers)
61{

Callers 1

setCookieMethod · 0.45

Calls 2

toStringFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected