509 lines
38 KiB
HTML
509 lines
38 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>ESP32 HTTPS Server: httpsserver Namespace Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">ESP32 HTTPS Server
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('namespacehttpsserver.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#enum-members">Enumerations</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">httpsserver Namespace Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1ConnectionContext.html">ConnectionContext</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Internal class to handle the state of a connection. <a href="classhttpsserver_1_1ConnectionContext.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html">HTTPBodyParser</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPConnection.html">HTTPConnection</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents a single open connection for the plain <a class="el" href="classhttpsserver_1_1HTTPServer.html" title="Main implementation for the plain HTTP server. Use HTTPSServer for TLS support. ">HTTPServer</a>, without TLS. <a href="classhttpsserver_1_1HTTPConnection.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPHeader.html">HTTPHeader</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents a single name/value pair of an HTTP header. <a href="classhttpsserver_1_1HTTPHeader.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPHeaders.html">HTTPHeaders</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Groups and manages a set of <a class="el" href="classhttpsserver_1_1HTTPHeader.html" title="Represents a single name/value pair of an HTTP header. ">HTTPHeader</a> instances. <a href="classhttpsserver_1_1HTTPHeaders.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html">HTTPMultipartBodyParser</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPNode.html">HTTPNode</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Base class for a URL/route-handler in the server. <a href="classhttpsserver_1_1HTTPNode.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents the request stream for an HTTP request. <a href="classhttpsserver_1_1HTTPRequest.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents the response stream of an HTTP request. <a href="classhttpsserver_1_1HTTPResponse.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPSConnection.html">HTTPSConnection</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Connection class for an open TLS-enabled connection to an <a class="el" href="classhttpsserver_1_1HTTPSServer.html" title="Main implementation of the HTTP Server with TLS support. Use HTTPServer for plain HTTP...">HTTPSServer</a>. <a href="classhttpsserver_1_1HTTPSConnection.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPServer.html">HTTPServer</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Main implementation for the plain HTTP server. Use <a class="el" href="classhttpsserver_1_1HTTPSServer.html" title="Main implementation of the HTTP Server with TLS support. Use HTTPServer for plain HTTP...">HTTPSServer</a> for TLS support. <a href="classhttpsserver_1_1HTTPServer.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPSServer.html">HTTPSServer</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Main implementation of the HTTP Server with TLS support. Use <a class="el" href="classhttpsserver_1_1HTTPServer.html" title="Main implementation for the plain HTTP server. Use HTTPSServer for TLS support. ">HTTPServer</a> for plain HTTP. <a href="classhttpsserver_1_1HTTPSServer.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html">HTTPURLEncodedBodyParser</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPValidator.html">HTTPValidator</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Internal representation of a validator function. <a href="classhttpsserver_1_1HTTPValidator.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1ResolvedResource.html">ResolvedResource</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents a resolved resource, meaning the result of mapping a string URL to an <a class="el" href="classhttpsserver_1_1HTTPNode.html" title="Base class for a URL/route-handler in the server. ">HTTPNode</a>. <a href="classhttpsserver_1_1ResolvedResource.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1ResourceNode.html">ResourceNode</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This <a class="el" href="classhttpsserver_1_1HTTPNode.html" title="Base class for a URL/route-handler in the server. ">HTTPNode</a> represents a route that maps to a regular HTTP request for a resource (static or dynamic) <a href="classhttpsserver_1_1ResourceNode.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1ResourceParameters.html">ResourceParameters</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="classhttpsserver_1_1ResourceParameters.html" title="The ResourceParameters provide access to the parameters passed in the URI. ">ResourceParameters</a> provide access to the parameters passed in the URI. <a href="classhttpsserver_1_1ResourceParameters.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1ResourceResolver.html">ResourceResolver</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class is used internally to resolve a string URL to the corresponding <a class="el" href="classhttpsserver_1_1HTTPNode.html" title="Base class for a URL/route-handler in the server. ">HTTPNode</a>. <a href="classhttpsserver_1_1ResourceResolver.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1SSLCert.html">SSLCert</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Certificate and private key that can be passed to the <a class="el" href="classhttpsserver_1_1HTTPSServer.html" title="Main implementation of the HTTP Server with TLS support. Use HTTPServer for plain HTTP...">HTTPSServer</a>. <a href="classhttpsserver_1_1SSLCert.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structhttpsserver_1_1WebsocketFrame.html">WebsocketFrame</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketHandler.html">WebsocketHandler</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html">WebsocketInputStreambuf</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketNode.html">WebsocketNode</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:a52016b2f3eb2452288ddae01a9f5633b"><td class="memItemLeft" align="right" valign="top">typedef void() </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a52016b2f3eb2452288ddae01a9f5633b">HTTPSMiddlewareFunction</a>(<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req, <a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> *res, std::function< void()> next)</td></tr>
|
|
<tr class="memdesc:a52016b2f3eb2452288ddae01a9f5633b"><td class="mdescLeft"> </td><td class="mdescRight">A middleware function that can be registered at the server. <a href="#a52016b2f3eb2452288ddae01a9f5633b">More...</a><br /></td></tr>
|
|
<tr class="separator:a52016b2f3eb2452288ddae01a9f5633b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2c7d94f7c5a324c8ddc602d4f28eccf8"><td class="memItemLeft" align="right" valign="top"><a id="a2c7d94f7c5a324c8ddc602d4f28eccf8"></a>
|
|
typedef void() </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a2c7d94f7c5a324c8ddc602d4f28eccf8">HTTPSCallbackFunction</a>(<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req, <a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> *res)</td></tr>
|
|
<tr class="memdesc:a2c7d94f7c5a324c8ddc602d4f28eccf8"><td class="mdescLeft"> </td><td class="mdescRight">A callback function that will be called by the server to handle a request. <br /></td></tr>
|
|
<tr class="separator:a2c7d94f7c5a324c8ddc602d4f28eccf8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7ca78e5104a4309327ffd0bfe824e060"><td class="memItemLeft" align="right" valign="top"><a id="a7ca78e5104a4309327ffd0bfe824e060"></a>
|
|
typedef bool() </td><td class="memItemRight" valign="bottom"><b>HTTPValidationFunction</b>(std::string)</td></tr>
|
|
<tr class="separator:a7ca78e5104a4309327ffd0bfe824e060"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac956e40dc0f8108fc3c73d67efa7c143"><td class="memItemLeft" align="right" valign="top"><a id="ac956e40dc0f8108fc3c73d67efa7c143"></a>
|
|
typedef <a class="el" href="classhttpsserver_1_1WebsocketHandler.html">WebsocketHandler</a> *() </td><td class="memItemRight" valign="bottom"><b>WebsocketHandlerCreator</b>()</td></tr>
|
|
<tr class="separator:ac956e40dc0f8108fc3c73d67efa7c143"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
Enumerations</h2></td></tr>
|
|
<tr class="memitem:a2dcb10ebf7a4b0511b3ca52d4af865ff"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ff">HTTPNodeType</a> { <a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ffa27a86a1f25dd96a2181cae0cc8376a12">HANDLER_CALLBACK</a>,
|
|
<a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ffa0d9fe62d6ba8d8d9e4e4245df77fdfac">WEBSOCKET</a>
|
|
}</td></tr>
|
|
<tr class="separator:a2dcb10ebf7a4b0511b3ca52d4af865ff"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abdec669031bd8d35895acf4ab78b0540"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540">SSLKeySize</a> { <a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540ae4cc1de2fea6a438e180a1e61f453627">KEYSIZE_1024</a> = 1024,
|
|
<a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540a67f843a9321473661d7db6b337e7ddf9">KEYSIZE_2048</a> = 2048,
|
|
<a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540ac85bb475fb6c09799af50bc28e5f3d44">KEYSIZE_4096</a> = 4096
|
|
}<tr class="memdesc:abdec669031bd8d35895acf4ab78b0540"><td class="mdescLeft"> </td><td class="mdescRight">Defines the key size for key generation. <a href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540">More...</a><br /></td></tr>
|
|
</td></tr>
|
|
<tr class="separator:abdec669031bd8d35895acf4ab78b0540"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a29faf1e31601ac1f50302a2813a06539"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a29faf1e31601ac1f50302a2813a06539">validationMiddleware</a> (<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req, <a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> *res, std::function< void()> next)</td></tr>
|
|
<tr class="separator:a29faf1e31601ac1f50302a2813a06539"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a95a1abf6125242682b1e624342a342b8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a95a1abf6125242682b1e624342a342b8">handleWebsocketHandshake</a> (<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req, <a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> *res)</td></tr>
|
|
<tr class="separator:a95a1abf6125242682b1e624342a342b8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae475bc730f2502e1f55ffc16a5f671a0"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#ae475bc730f2502e1f55ffc16a5f671a0">websocketKeyResponseHash</a> (std::string const &key)</td></tr>
|
|
<tr class="separator:ae475bc730f2502e1f55ffc16a5f671a0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeb87e6cdb0a41241836a8f8c45315320"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#aeb87e6cdb0a41241836a8f8c45315320">normalizeHeaderName</a> (std::string const &name)</td></tr>
|
|
<tr class="memdesc:aeb87e6cdb0a41241836a8f8c45315320"><td class="mdescLeft"> </td><td class="mdescRight">Normalizes case in header names. <a href="#aeb87e6cdb0a41241836a8f8c45315320">More...</a><br /></td></tr>
|
|
<tr class="separator:aeb87e6cdb0a41241836a8f8c45315320"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0c2a1f6a28893f118e6980dab067d651"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a0c2a1f6a28893f118e6980dab067d651">createSelfSignedCert</a> (<a class="el" href="classhttpsserver_1_1SSLCert.html">SSLCert</a> &certCtx, <a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540">SSLKeySize</a> keySize, std::string dn, std::string validFrom="20190101000000", std::string validUntil="20300101000000")</td></tr>
|
|
<tr class="memdesc:a0c2a1f6a28893f118e6980dab067d651"><td class="mdescLeft"> </td><td class="mdescRight">Creates a self-signed certificate on the ESP32. <a href="#a0c2a1f6a28893f118e6980dab067d651">More...</a><br /></td></tr>
|
|
<tr class="separator:a0c2a1f6a28893f118e6980dab067d651"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aea5ae9c472f1c29ef827ae3ba86c9b6b"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#aea5ae9c472f1c29ef827ae3ba86c9b6b">parseUInt</a> (std::string const &s, uint32_t max=0xffffffff)</td></tr>
|
|
<tr class="memdesc:aea5ae9c472f1c29ef827ae3ba86c9b6b"><td class="mdescLeft"> </td><td class="mdescRight"><b>Utility function</b>: Parse an unsigned integer from a string <a href="#aea5ae9c472f1c29ef827ae3ba86c9b6b">More...</a><br /></td></tr>
|
|
<tr class="separator:aea5ae9c472f1c29ef827ae3ba86c9b6b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a902060de8aa1a10db6765ab45acdcdb1"><td class="memItemLeft" align="right" valign="top"><a id="a902060de8aa1a10db6765ab45acdcdb1"></a>
|
|
int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a902060de8aa1a10db6765ab45acdcdb1">parseInt</a> (std::string const &s)</td></tr>
|
|
<tr class="memdesc:a902060de8aa1a10db6765ab45acdcdb1"><td class="mdescLeft"> </td><td class="mdescRight"><b>Utility function</b>: Parse a signed integer from a string <br /></td></tr>
|
|
<tr class="separator:a902060de8aa1a10db6765ab45acdcdb1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a014596d87bcb9b9125278321cbcf8606"><td class="memItemLeft" align="right" valign="top"><a id="a014596d87bcb9b9125278321cbcf8606"></a>
|
|
std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a014596d87bcb9b9125278321cbcf8606">intToString</a> (int i)</td></tr>
|
|
<tr class="memdesc:a014596d87bcb9b9125278321cbcf8606"><td class="mdescLeft"> </td><td class="mdescRight"><b>Utility function</b>: Transform an int to a std::string <br /></td></tr>
|
|
<tr class="separator:a014596d87bcb9b9125278321cbcf8606"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a77e019a32c9d7a94a332439c8fafe11b"><td class="memItemLeft" align="right" valign="top"><a id="a77e019a32c9d7a94a332439c8fafe11b"></a>
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a77e019a32c9d7a94a332439c8fafe11b">validateNotEmpty</a> (std::string s)</td></tr>
|
|
<tr class="memdesc:a77e019a32c9d7a94a332439c8fafe11b"><td class="mdescLeft"> </td><td class="mdescRight"><b>Built-in validator function</b>: Checks that a string is not empty. <br /></td></tr>
|
|
<tr class="separator:a77e019a32c9d7a94a332439c8fafe11b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a500009d98ebaf9c02f14f902fb6e9a7b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehttpsserver.html#a500009d98ebaf9c02f14f902fb6e9a7b">validateUnsignedInteger</a> (std::string s)</td></tr>
|
|
<tr class="memdesc:a500009d98ebaf9c02f14f902fb6e9a7b"><td class="mdescLeft"> </td><td class="mdescRight"><b>Built-in validator function</b>: Checks that a value is a positive int <a href="#a500009d98ebaf9c02f14f902fb6e9a7b">More...</a><br /></td></tr>
|
|
<tr class="separator:a500009d98ebaf9c02f14f902fb6e9a7b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file contains some validator functions that can be used to validate URL parameters.</p>
|
|
<p>They covor common cases like checking for integer, non-empty, ..., so the user of this library does not need to write them on his own. </p>
|
|
</div><h2 class="groupheader">Typedef Documentation</h2>
|
|
<a id="a52016b2f3eb2452288ddae01a9f5633b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a52016b2f3eb2452288ddae01a9f5633b">◆ </a></span>HTTPSMiddlewareFunction</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef void() httpsserver::HTTPSMiddlewareFunction(<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req, <a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> *res, std::function< void()> next)</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A middleware function that can be registered at the server. </p>
|
|
<p>It will be called before an incoming request is passed to any HTTPSCallbackFunction and may perform operations like redirects or authentication.</p>
|
|
<p>It receives the request and response object as well as a function pointer ("next") to pass on processing. This allows chaining those functions. If next() is not called, the HTTPSCallbackFunction that would match the request url will not be invoked. This might become handy if you want to intercept request handling in case of missing authentication. Don't forget to call next in case you want to access your resources, though. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
<a id="a2dcb10ebf7a4b0511b3ca52d4af865ff"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2dcb10ebf7a4b0511b3ca52d4af865ff">◆ </a></span>HTTPNodeType</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ff">httpsserver::HTTPNodeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a2dcb10ebf7a4b0511b3ca52d4af865ffa27a86a1f25dd96a2181cae0cc8376a12"></a>HANDLER_CALLBACK </td><td class="fielddoc"><p>Node with a handler callback function (class <a class="el" href="classhttpsserver_1_1ResourceNode.html" title="This HTTPNode represents a route that maps to a regular HTTP request for a resource (static or dynami...">ResourceNode</a>) </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a2dcb10ebf7a4b0511b3ca52d4af865ffa0d9fe62d6ba8d8d9e4e4245df77fdfac"></a>WEBSOCKET </td><td class="fielddoc"><p>Node with a websocket handler (class <a class="el" href="classhttpsserver_1_1WebsocketNode.html">WebsocketNode</a>) </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abdec669031bd8d35895acf4ab78b0540"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abdec669031bd8d35895acf4ab78b0540">◆ </a></span>SSLKeySize</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540">httpsserver::SSLKeySize</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Defines the key size for key generation. </p>
|
|
<p>Not available if the <code>HTTPS_DISABLE_SELFSIGNING</code> compiler flag is set </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="abdec669031bd8d35895acf4ab78b0540ae4cc1de2fea6a438e180a1e61f453627"></a>KEYSIZE_1024 </td><td class="fielddoc"><p>RSA key with 1024 bit. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="abdec669031bd8d35895acf4ab78b0540a67f843a9321473661d7db6b337e7ddf9"></a>KEYSIZE_2048 </td><td class="fielddoc"><p>RSA key with 2048 bit. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="abdec669031bd8d35895acf4ab78b0540ac85bb475fb6c09799af50bc28e5f3d44"></a>KEYSIZE_4096 </td><td class="fielddoc"><p>RSA key with 4096 bit. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a0c2a1f6a28893f118e6980dab067d651"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0c2a1f6a28893f118e6980dab067d651">◆ </a></span>createSelfSignedCert()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int httpsserver::createSelfSignedCert </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classhttpsserver_1_1SSLCert.html">SSLCert</a> & </td>
|
|
<td class="paramname"><em>certCtx</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="namespacehttpsserver.html#abdec669031bd8d35895acf4ab78b0540">SSLKeySize</a> </td>
|
|
<td class="paramname"><em>keySize</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::string </td>
|
|
<td class="paramname"><em>dn</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::string </td>
|
|
<td class="paramname"><em>validFrom</em> = <code>"20190101000000"</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::string </td>
|
|
<td class="paramname"><em>validUntil</em> = <code>"20300101000000"</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Creates a self-signed certificate on the ESP32. </p>
|
|
<p>This function creates a new self-signed certificate for the given hostname on the heap. Make sure to clear() it before you delete it.</p>
|
|
<p>The distinguished name (dn) parameter has to follow the x509 specifications. An example would be: CN=myesp.local,O=acme,C=US</p>
|
|
<p>The strings validFrom and validUntil have to be formatted like this: "20190101000000", "20300101000000"</p>
|
|
<p>This will take some time, so you should probably write the certificate data to non-volatile storage when you are done.</p>
|
|
<p>Setting the <code>HTTPS_DISABLE_SELFSIGNING</code> compiler flag will remove this function from the library </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a95a1abf6125242682b1e624342a342b8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a95a1abf6125242682b1e624342a342b8">◆ </a></span>handleWebsocketHandshake()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void httpsserver::handleWebsocketHandshake </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> * </td>
|
|
<td class="paramname"><em>req</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> * </td>
|
|
<td class="paramname"><em>res</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Handler function for the websocket handshake. Will be used by <a class="el" href="classhttpsserver_1_1HTTPConnection.html" title="Represents a single open connection for the plain HTTPServer, without TLS. ">HTTPConnection</a> if a websocket is detected </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aeb87e6cdb0a41241836a8f8c45315320"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aeb87e6cdb0a41241836a8f8c45315320">◆ </a></span>normalizeHeaderName()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string httpsserver::normalizeHeaderName </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::string const & </td>
|
|
<td class="paramname"><em>name</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Normalizes case in header names. </p>
|
|
<p>It converts the first letter and every letter after a non-alnum character to uppercase. For example, "content-length" becomes "Content-Length" and "HOST" becomes "Host". </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aea5ae9c472f1c29ef827ae3ba86c9b6b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aea5ae9c472f1c29ef827ae3ba86c9b6b">◆ </a></span>parseUInt()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint32_t httpsserver::parseUInt </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::string const & </td>
|
|
<td class="paramname"><em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>max</em> = <code>0xffffffff</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p><b>Utility function</b>: Parse an unsigned integer from a string </p>
|
|
<p>The second parameter can be used to define the maximum value that is acceptable </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a500009d98ebaf9c02f14f902fb6e9a7b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a500009d98ebaf9c02f14f902fb6e9a7b">◆ </a></span>validateUnsignedInteger()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool httpsserver::validateUnsignedInteger </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::string </td>
|
|
<td class="paramname"><em>s</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p><b>Built-in validator function</b>: Checks that a value is a positive int </p>
|
|
<p>Checks that the value is a positive integer (combine it with newValidateUnsignedIntegerMax if you have constraints regarding the size of that number) </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a29faf1e31601ac1f50302a2813a06539"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a29faf1e31601ac1f50302a2813a06539">◆ </a></span>validationMiddleware()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void httpsserver::validationMiddleware </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> * </td>
|
|
<td class="paramname"><em>req</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a> * </td>
|
|
<td class="paramname"><em>res</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::function< void()> </td>
|
|
<td class="paramname"><em>next</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Middleware function that handles the validation of parameters </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae475bc730f2502e1f55ffc16a5f671a0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae475bc730f2502e1f55ffc16a5f671a0">◆ </a></span>websocketKeyResponseHash()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string httpsserver::websocketKeyResponseHash </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::string const & </td>
|
|
<td class="paramname"><em>key</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Function used to compute the value of the Sec-WebSocket-Accept during Websocket handshake </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li>
|
|
<li class="footer">Generated by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|