Comments (4)
You could run a check against some persistent data to see what you should return in the request handler.
I've never thought about the server needing to be shut down but I think just deleting the instance would do it? Haven't checked though.
from smooth.
I think it is better to activate a different page showing a hint how to activate the config page (e.g. by pressing a button). So, the server does not need to be shut down.
But in this case I need to manage two different handlers for the Path "" and switch between these. Is there an easy way to delete a handler which was previously attached to the server via the HTTPServer.on() method?
Edit:
I see that a handler is added to an unordered map using: handlers[method][url] = handler;
. So I guess activating a new handler with the same values for "method" and "url" via the on() method will simply replace the old one, correct?
from smooth.
It seems to work like described in the Edit section of my previous post. So I'll close this.
from smooth.
It seems to work like described in the Edit section of my previous post. So I'll close this.
from smooth.
Related Issues (20)
- Problems with Wifi.cpp and SDCard.cpp HOT 7
- "Slow" reaction on TCP telegrams HOT 16
- Discussion: SPI Master & SDCard updates HOT 2
- SystemStatistics.h needs #pragma once HOT 3
- Discussion: new I2C sensor SHT30 HOT 2
- github actions: compile host and esp32 build in parallel HOT 2
- use full capability of cmake HOT 2
- Change Task tick up once it's created HOT 2
- HTTP Server not working on host system HOT 2
- Byte error in transmission using "responses::FileContentResponse" HOT 4
- C++ code vs expectations HOT 5
- MQTT maximum throughput HOT 10
- Trouble running build_test.sh HOT 7
- βCan you require smooth from a traditional ESP-IDF component? HOT 4
- Connecting to AWS IoT HOT 2
- MQTT user/password authentication HOT 11
- [Feature Request] PPPoS support HOT 1
- MMCSDCard.cpp fails to compile for esp32-c3 HOT 1
- Disable -Werror=old-style-cast
- Completely broken? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smooth.