File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ def mime_type(filename):
174174
175175
176176class HTTPResponse :
177- """Details of an HTTP response. Use in @ `HTTPServer.route` decorator functions."""
177+ """Details of an HTTP response. Use in `HTTPServer.route` decorator functions."""
178178
179179 _HEADERS_FORMAT = (
180180 "HTTP/1.1 {}\r \n "
@@ -365,8 +365,8 @@ def poll(self):
365365 @property
366366 def requestbuffersize (self ) -> int :
367367 """
368- The maximum size of the incoming request buffer. If the default size isn't
369- adequate to handle your incoming data you can set this after creating the
368+ The maximum size of the incoming request buffer. If the default size isn't
369+ adequate to handle your incoming data you can set this after creating the
370370 server instance.
371371
372372 Default size is 1024 bytes.
Original file line number Diff line number Diff line change @@ -6,3 +6,22 @@ Ensure your device works with this simple test.
66.. literalinclude :: ../examples/httpserver_simpletest.py
77 :caption: examples/httpserver_simpletest.py
88 :linenos:
9+
10+ Temperature test
11+ --------------------
12+
13+ Send the microcontroller temperature back to the browser with this simple test.
14+
15+ .. literalinclude :: ../examples/httpserver_temperature.py
16+ :caption: examples/httpserver_temperature.py
17+ :linenos:
18+
19+ Simple polling test
20+ -------------------
21+
22+ If you want your code to do more than just serve web pages,
23+ use the start/poll methods as shown in this example.
24+
25+ .. literalinclude :: ../examples/httpserver_simplepolling.py
26+ :caption: examples/httpserver_simplepolling.py
27+ :linenos:
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def base(request): # pylint: disable=unused-argument
3030
3131while True :
3232 try :
33+ # do something useful in this section
3334 # processing any waiting requests
3435 server .poll ()
3536 except OSError :
You can’t perform that action at this time.
0 commit comments