提交 5a63884e 编写于 作者: 云逸之's avatar 云逸之 💬

更新发行版

上级 e222355c
......@@ -17,9 +17,22 @@ const uint8_t index_html_gz[] = {
以下使用 `esp_http_server.h`。设置http响应头`Content-Encoding` 中压缩格式,让浏览器按gzip格式解压
esp32系列按以下方式
```cpp
httpd_resp_set_type(req, "text/html");
httpd_resp_set_hdr(req, "Content-Encoding", "gzip");
```
[点此下载](https://gitcode.net/org.btik/html_cutdown/-/archive/1.0beta/html_cutdown-1.0beta.zip)
\ No newline at end of file
esp8266按以下方式
```cpp
ESP8266WebServer server(80);
// ... 省略中间
server.sendHeader("Content-Encoding", "gzip");
server.send(200, "text/html", index_html_gz, index_html_len);
```
[点此下载](https://gitcode.net/org.btik/html_cutdown/uploads/19a4a945e43633e88dd5404789506413/htmlCutDown.zip)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册