mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2026-01-27 01:02:19 +01:00
Moved implementations in cpp files
This commit is contained in:
22
src/AsyncWebHeader.cpp
Normal file
22
src/AsyncWebHeader.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <ESPAsyncWebServer.h>
|
||||
|
||||
AsyncWebHeader::AsyncWebHeader(const String& data) {
|
||||
if (!data)
|
||||
return;
|
||||
int index = data.indexOf(':');
|
||||
if (index < 0)
|
||||
return;
|
||||
_name = data.substring(0, index);
|
||||
_value = data.substring(index + 2);
|
||||
}
|
||||
|
||||
String AsyncWebHeader::toString() const {
|
||||
String str;
|
||||
str.reserve(_name.length() + _value.length() + 2);
|
||||
str.concat(_name);
|
||||
str.concat((char)0x3a);
|
||||
str.concat((char)0x20);
|
||||
str.concat(_value);
|
||||
str.concat(asyncsrv::T_rn);
|
||||
return str;
|
||||
}
|
||||
Reference in New Issue
Block a user