# ESPAsyncWebServer
[![Build Status](https://travis-ci.org/me-no-dev/ESPAsyncWebServer.svg?branch=master)](https://travis-ci.org/me-no-dev/ESPAsyncWebServer) ![](https://github.com/me-no-dev/ESPAsyncWebServer/workflows/ESP%20Async%20Web%20Server%20CI/badge.svg) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/395dd42cfc674e6ca2e326af3af80ffc)](https://www.codacy.com/manual/me-no-dev/ESPAsyncWebServer?utm_source=github.com&utm_medium=referral&utm_content=me-no-dev/ESPAsyncWebServer&utm_campaign=Badge_Grade)
For help and support [![Join the chat at https://gitter.im/me-no-dev/ESPAsyncWebServer](https://badges.gitter.im/me-no-dev/ESPAsyncWebServer.svg)](https://gitter.im/me-no-dev/ESPAsyncWebServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Async HTTP and WebSocket Server for ESP8266 Arduino
For ESP8266 it requires [ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP)
To use this library you might need to have the latest git versions of [ESP8266](https://github.com/esp8266/Arduino) Arduino Core
For ESP32 it requires [AsyncTCP](https://github.com/me-no-dev/AsyncTCP) to work
To use this library you might need to have the latest git versions of [ESP32](https://github.com/espressif/arduino-esp32) Arduino Core
## Table of contents
- [ESPAsyncWebServer](#espasyncwebserver)
- [Table of contents](#table-of-contents)
- [Installation](#installation)
- [Using PlatformIO](#using-platformio)
- [Why should you care](#why-should-you-care)
- [Important things to remember](#important-things-to-remember)
- [Principles of operation](#principles-of-operation)
- [The Async Web server](#the-async-web-server)
- [Request Life Cycle](#request-life-cycle)
- [Rewrites and how do they work](#rewrites-and-how-do-they-work)
- [Handlers and how do they work](#handlers-and-how-do-they-work)
- [Responses and how do they work](#responses-and-how-do-they-work)
- [Template processing](#template-processing)
- [Libraries and projects that use AsyncWebServer](#libraries-and-projects-that-use-asyncwebserver)
- [Request Variables](#request-variables)
- [Common Variables](#common-variables)
- [Headers](#headers)
- [GET, POST and FILE parameters](#get-post-and-file-parameters)
- [FILE Upload handling](#file-upload-handling)
- [Body data handling](#body-data-handling)
- [JSON body handling with ArduinoJson](#json-body-handling-with-arduinojson)
- [Responses](#responses)
- [Redirect to another URL](#redirect-to-another-url)
- [Basic response with HTTP Code](#basic-response-with-http-code)
- [Basic response with HTTP Code and extra headers](#basic-response-with-http-code-and-extra-headers)
- [Basic response with string content](#basic-response-with-string-content)
- [Basic response with string content and extra headers](#basic-response-with-string-content-and-extra-headers)
- [Send large webpage from PROGMEM](#send-large-webpage-from-progmem)
- [Send large webpage from PROGMEM and extra headers](#send-large-webpage-from-progmem-and-extra-headers)
- [Send large webpage from PROGMEM containing templates](#send-large-webpage-from-progmem-containing-templates)
- [Send large webpage from PROGMEM containing templates and extra headers](#send-large-webpage-from-progmem-containing-templates-and-extra-headers)
- [Send binary content from PROGMEM](#send-binary-content-from-progmem)
- [Respond with content coming from a Stream](#respond-with-content-coming-from-a-stream)
- [Respond with content coming from a Stream and extra headers](#respond-with-content-coming-from-a-stream-and-extra-headers)
- [Respond with content coming from a Stream containing templates](#respond-with-content-coming-from-a-stream-containing-templates)
- [Respond with content coming from a Stream containing templates and extra headers](#respond-with-content-coming-from-a-stream-containing-templates-and-extra-headers)
- [Respond with content coming from a File](#respond-with-content-coming-from-a-file)
- [Respond with content coming from a File and extra headers](#respond-with-content-coming-from-a-file-and-extra-headers)
- [Respond with content coming from a File containing templates](#respond-with-content-coming-from-a-file-containing-templates)
- [Respond with content using a callback](#respond-with-content-using-a-callback)
- [Respond with content using a callback and extra headers](#respond-with-content-using-a-callback-and-extra-headers)
- [Respond with content using a callback containing templates](#respond-with-content-using-a-callback-containing-templates)
- [Respond with content using a callback containing templates and extra headers](#respond-with-content-using-a-callback-containing-templates-and-extra-headers)
- [Chunked Response](#chunked-response)
- [Chunked Response containing templates](#chunked-response-containing-templates)
- [Print to response](#print-to-response)
- [ArduinoJson Basic Response](#arduinojson-basic-response)
- [ArduinoJson Advanced Response](#arduinojson-advanced-response)
- [Serving static files](#serving-static-files)
- [Serving specific file by name](#serving-specific-file-by-name)
- [Serving files in directory](#serving-files-in-directory)
- [Serving static files with authentication](#serving-static-files-with-authentication)
- [Specifying Cache-Control header](#specifying-cache-control-header)
- [Specifying Date-Modified header](#specifying-date-modified-header)
- [Specifying Template Processor callback](#specifying-template-processor-callback)
- [Param Rewrite With Matching](#param-rewrite-with-matching)
- [Using filters](#using-filters)
- [Serve different site files in AP mode](#serve-different-site-files-in-ap-mode)
- [Rewrite to different index on AP](#rewrite-to-different-index-on-ap)
- [Serving different hosts](#serving-different-hosts)
- [Determine interface inside callbacks](#determine-interface-inside-callbacks)
- [Bad Responses](#bad-responses)
- [Respond with content using a callback without content length to HTTP/1.0 clients](#respond-with-content-using-a-callback-without-content-length-to-http10-clients)
- [Async WebSocket Plugin](#async-websocket-plugin)
- [Async WebSocket Event](#async-websocket-event)
- [Methods for sending data to a socket client](#methods-for-sending-data-to-a-socket-client)
- [Direct access to web socket message buffer](#direct-access-to-web-socket-message-buffer)
- [Limiting the number of web socket clients](#limiting-the-number-of-web-socket-clients)
- [Async Event Source Plugin](#async-event-source-plugin)
- [Setup Event Source on the server](#setup-event-source-on-the-server)
- [Setup Event Source in the browser](#setup-event-source-in-the-browser)
- [Scanning for available WiFi Networks](#scanning-for-available-wifi-networks)
- [Remove handlers and rewrites](#remove-handlers-and-rewrites)
- [Setting up the server](#setting-up-the-server)
- [Setup global and class functions as request handlers](#setup-global-and-class-functions-as-request-handlers)
- [Methods for controlling websocket connections](#methods-for-controlling-websocket-connections)
- [Adding Default Headers](#adding-default-headers)
- [Path variable](#path-variable)
## Installation
### Using PlatformIO
[PlatformIO](http://platformio.org) is an open source ecosystem for IoT development with cross platform build system, library manager and full support for Espressif ESP8266/ESP32 development. It works on the popular host OS: Mac OS X, Windows, Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
1. Install [PlatformIO IDE](http://platformio.org/platformio-ide)
2. Create new project using "PlatformIO Home > New Project"
3. Update dev/platform to staging version:
- [Instruction for Espressif 8266](http://docs.platformio.org/en/latest/platforms/espre
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ESP32+dht11/sht30测温湿度(arduino编程实现) (1309个子文件)
lib_ucr1_hd_wl_sta_intwpa_v2.7.0.a 983KB
lib_ucr2_hd_wl_sta_intwpa_v2.7.0.a 981KB
libnewlib_addons-at32ucr2-speed_opt.a 25KB
libnewlib_addons-at32ucr2-speed_opt.a 25KB
lib_ucr1_hd_spi_v2.7.0.a 13KB
lib_ucr2_hd_spi_v2.7.0.a 13KB
lib_ucr1_hd_sdio_v2.7.0.a 12KB
lib_ucr2_hd_sdio_v2.7.0.a 12KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1KB
README.adoc 1009B
README.adoc 1005B
README.adoc 1003B
README.adoc 993B
README.adoc 991B
README.adoc 868B
wifishield.atsln 2KB
AUTHORS 2KB
arduino.bmp 7KB
arduino.bmp 7KB
.test.build_flags 25B
dhcp.c 61KB
tcp_in.c 54KB
ard_spi.c 51KB
etharp.c 44KB
tcp.c 43KB
tcp_out.c 35KB
flashc.c 32KB
flashc.c 32KB
smc.c 31KB
pbuf.c 31KB
dns.c 30KB
udp.c 28KB
usart.c 28KB
usart.c 28KB
ip_frag.c 26KB
igmp.c 25KB
ip.c 24KB
tcp_mbedtls.c 23KB
ard_tcp.c 22KB
mem.c 22KB
at45dbx.c 22KB
at45dbx.c 21KB
cmd_wl.c 20KB
power_clocks_lib.c 19KB
power_clocks_lib.c 19KB
netif.c 19KB
autoip.c 16KB
pm.c 14KB
pm.c 14KB
gpio.c 13KB
gpio.c 13KB
inet_chksum.c 13KB
wl_cm.c 13KB
ctrl_access.c 12KB
ctrl_access.c 12KB
avr32_spi.c 11KB
wlif.c 11KB
ping.c 11KB
init.c 11KB
icmp.c 11KB
memp.c 11KB
main.c 11KB
tc.c 11KB
TembooWebSocketRequestHandles.c 11KB
raw.c 11KB
spi.c 10KB
led.c 10KB
led.c 10KB
led.c 10KB
led.c 10KB
spi.c 10KB
MQTTPacket.c 10KB
pdca.c 9KB
intc.c 9KB
intc.c 9KB
printf-stdarg.c 9KB
printf-stdarg.c 8KB
board_init.c 8KB
glcdfont.c 8KB
glcdfont.c 8KB
MQTTFormat.c 8KB
ard_utils.c 8KB
util.c 7KB
pm_conf_clocks.c 7KB
pm_conf_clocks.c 7KB
inet.c 7KB
console.c 6KB
timer.c 6KB
eic.c 6KB
MQTTConnectClient.c 6KB
共 1309 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
- 好运爆棚2023-07-29件提供了关于使用ESP32和DHT11/SHT30测量温湿度的详细指导,让我能够快速上手并实现项目。
- 生活教会我们2023-07-29件为我提供了一种简单且高效的解决方案,让我能够在我的项目中轻松地集成温湿度监测功能。
- 人亲卓玛2023-07-29件提供了多种温湿度测量器件的选择,满足不同项目需求的要求。
- 洋葱庄2023-07-29于代码的解释非常清晰,即使对于初学者来说也很容易理解和跟随。
- 三更寒天2023-07-29出了一些额外的实用建议,帮助我顺利完成了温湿度测量的任务。
莫跖
- 粉丝: 18
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 沈丘盛世龙门图纸符合规范化
- HM3400-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于python+streamlit联邦学习进行高校学生成绩预测研究python源码+项目说明+模型+数据.zip
- HM3400D-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- HM3400B-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- spring-boot示例
- 搜集火星资源.py
- JAR应用启动停止脚本化解决方案.zip
- 配合eclipse svn插件subclipse-4.3.4版本的javahl
- Bash脚本教程:如何优雅地停止JAR服务.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功