Is http routing possible?

I want to make an app that hosts a simple web page on board the Core, however I cannot seem to figure out how to make a router. Is there a way to get the request URI?

I’m not sure I understand what you mean by router in this context. However, many have created HTTP servers using the Webduino library.

Ah ok. I saw that library but i wasn’t sure if it was capable of routing.

What I mean is path routing. ie: mycore.local/page1 , mycore.local/page2, mycore.local/view/somepage

The example below they have a simple syntax which is basically just this, “server.on(’/page1’, doCallBack);”.

The best example I can find for Arduino IDE (esp8266 kit though) is the ESP8266 WebServer

I just noticed the addCommand method, that looks like it does exactly what I need.

1 Like