-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266WebServer minor public interface addition - content from const char* #3492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,13 +117,15 @@ class ESP8266WebServer | |
// content - actual content body | ||
void send(int code, const char* content_type = NULL, const String& content = String("")); | ||
void send(int code, char* content_type, const String& content); | ||
void send(int code, const char* content_type, const char* content, size_t contentLength); | ||
void send(int code, const String& content_type, const String& content); | ||
void send_P(int code, PGM_P content_type, PGM_P content); | ||
void send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength); | ||
|
||
void setContentLength(const size_t contentLength); | ||
void sendHeader(const String& name, const String& value, bool first = false); | ||
void sendContent(const String& content); | ||
void sendContent(const char* content, size_t contentLength); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For many people programming in C, |
||
void sendContent_P(PGM_P content); | ||
void sendContent_P(PGM_P content, size_t size); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation does not match the one for sendContent(String&), which uses chunked encoding and leaves fragmentation to the lower level code (WiFiClient). It would be nice if this sendContent(data, size) and sendContent(String) would behave the same way.