• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

WiFi Manager example with Preference library

Q&A Forum › Category: ESP32 › WiFi Manager example with Preference library
0 Vote Up Vote Down
Vugar Novruzov asked 2 years ago

Dear Sara
in case of using Preference library instead of SPIFFS
how we need to change this part of code ?
// Web Server Root URL
server.on(“/”, HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, “/wifimanager.html”, “text/html”);
});
server.serveStatic("/", SPIFFS, "/");

server.on("/", HTTP_POST, [](AsyncWebServerRequest *request) {

Thank you

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
I don’t  think the AsyncWebServer library allows to get data from Preferences directly.
You need to read the data, save it on a variable and then, send it manually to the web server.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.