WebServer¶
詳細情報¶
メンバー¶
WebServer()¶
WebServer::WebServer(IPAddress addr, int port=80)
引数
- IPAddress
addr
- int
port
WebServer()¶
WebServer::WebServer(int port=80)
引数
- int
port
~WebServer()¶
WebServer::~WebServer()
begin()¶
void WebServer::begin()
begin()¶
void WebServer::begin(uint16_t port)
引数
- uint16_t
port
handleClient()¶
void WebServer::handleClient()
close()¶
void WebServer::close()
stop()¶
void WebServer::stop()
authenticate()¶
bool WebServer::authenticate(const char *username, const char *password)
引数
- constchar *
username
- constchar *
password
戻り値
bool
requestAuthentication()¶
void WebServer::requestAuthentication(HTTPAuthMethod mode=BASIC_AUTH, const char *realm=NULL, const String &authFailMsg=String(""))
引数
- HTTPAuthMethod
mode
- constchar *
realm
- constString &
authFailMsg
on()¶
void WebServer::on(const String &uri, THandlerFunction handler)
引数
- constString &
uri
- THandlerFunction
handler
on()¶
void WebServer::on(const String &uri, HTTPMethod method, THandlerFunction fn)
引数
- constString &
uri
- HTTPMethod
method
- THandlerFunction
fn
on()¶
void WebServer::on(const String &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn)
引数
- constString &
uri
- HTTPMethod
method
- THandlerFunction
fn
- THandlerFunction
ufn
addHandler()¶
void WebServer::addHandler(RequestHandler *handler)
引数
- RequestHandler*
handler
serveStatic()¶
void WebServer::serveStatic(const char *uri, fs::FS &fs, const char *path, const char *cache_header=NULL)
引数
- constchar *
uri
- fs::FS&
fs
- constchar *
path
- constchar *
cache_header
onNotFound()¶
void WebServer::onNotFound(THandlerFunction fn)
引数
- THandlerFunction
fn
onFileUpload()¶
void WebServer::onFileUpload(THandlerFunction fn)
引数
- THandlerFunction
fn
uri()¶
String WebServer::uri()
戻り値
String
method()¶
HTTPMethod WebServer::method()
戻り値
HTTPMethod
client()¶
virtual WiFiClient WebServer::client()
戻り値
WiFiClient
upload()¶
HTTPUpload& WebServer::upload()
戻り値
HTTPUpload&
pathArg()¶
String WebServer::pathArg(unsigned int i)
引数
- unsigned int
i
戻り値
String
arg()¶
String WebServer::arg(String name)
引数
- String
name
戻り値
String
arg()¶
String WebServer::arg(int i)
引数
- int
i
戻り値
String
argName()¶
String WebServer::argName(int i)
引数
- int
i
戻り値
String
args()¶
int WebServer::args()
戻り値
int
hasArg()¶
bool WebServer::hasArg(String name)
引数
- String
name
戻り値
bool
collectHeaders()¶
void WebServer::collectHeaders(const char *headerKeys[], const size_t headerKeysCount)
引数
- constchar *
headerKeys
- constsize_t
headerKeysCount
header()¶
String WebServer::header(String name)
引数
- String
name
戻り値
String
header()¶
String WebServer::header(int i)
引数
- int
i
戻り値
String
headerName()¶
String WebServer::headerName(int i)
引数
- int
i
戻り値
String
headers()¶
int WebServer::headers()
戻り値
int
hasHeader()¶
bool WebServer::hasHeader(String name)
引数
- String
name
戻り値
bool
hostHeader()¶
String WebServer::hostHeader()
戻り値
String
send()¶
void WebServer::send(int code, const char *content_type=NULL, const String &content=String(""))
引数
- int
code
- constchar *
content_type
- constString &
content
send()¶
void WebServer::send(int code, char *content_type, const String &content)
引数
- int
code
- char *
content_type
- constString &
content
send()¶
void WebServer::send(int code, const String &content_type, const String &content)
引数
- int
code
- constString &
content_type
- constString &
content
send_P()¶
void WebServer::send_P(int code, PGM_P content_type, PGM_P content)
引数
- int
code
- PGM_P
content_type
- PGM_P
content
send_P()¶
void WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength)
引数
- int
code
- PGM_P
content_type
- PGM_P
content
- size_t
contentLength
enableCORS()¶
void WebServer::enableCORS(boolean value=true)
引数
- boolean
value
enableCrossOrigin()¶
void WebServer::enableCrossOrigin(boolean value=true)
引数
- boolean
value
setContentLength()¶
void WebServer::setContentLength(const size_t contentLength)
引数
- constsize_t
contentLength
sendHeader()¶
void WebServer::sendHeader(const String &name, const String &value, bool first=false)
引数
- constString &
name
- constString &
value
- bool
first
sendContent()¶
void WebServer::sendContent(const String &content)
引数
- constString &
content
sendContent_P()¶
void WebServer::sendContent_P(PGM_P content)
引数
- PGM_P
content
sendContent_P()¶
void WebServer::sendContent_P(PGM_P content, size_t size)
引数
- PGM_P
content
- size_t
size
streamFile()¶
size_t WebServer::streamFile(T &file, const String &contentType)
引数
- T&
file
- constString &
contentType
戻り値
size_t
urlDecode()¶
String WebServer::urlDecode(const String &text)
引数
- constString &
text
戻り値
String