-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add methods for upload handler * fix signatures * use actually exported type for web request type * remove path handlers (will be in rich_http_server) * remove handler code -- library now just has the URL token processing * add example * README formatting * bump version * remove extraneous line
- Loading branch information
Showing
13 changed files
with
37 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
examples/esp8266_async_webserver/ESP8266AsyncWebServer.ino
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <Arduino.h> | ||
|
||
#include <TokenIterator.h> | ||
#include <UrlTokenBindings.h> | ||
|
||
void setup() { | ||
Serial.begin(115200); | ||
|
||
char p1[] = "example/path/a/b/c"; | ||
char p2[] = "example/path/:var1/:var2/:var3"; | ||
|
||
TokenIterator itr1(p1, strlen(p1), '/'); | ||
TokenIterator itr2(p2, strlen(p2), '/'); | ||
UrlTokenBindings bindings(itr1, itr2); | ||
|
||
if (bindings.hasBinding("var1")) { // has this one | ||
Serial.println(bindings.get("var1")); // will print "a" | ||
} | ||
|
||
if (bindings.hasBinding("var4")) { | ||
// does not have this binding | ||
} | ||
} | ||
|
||
void loop() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name=PathVariableHandlers | ||
version=1.1.0 | ||
version=2.0.0 | ||
author=Chris Mullins <[email protected]> | ||
maintainer=Chris Mullins <[email protected]> | ||
sentence=Library for handling paths containing variables. | ||
paragraph=Many RESTful APIs contain resources that have variables in their paths (e.g., /things/:thing_id). This library exposes a way to easily process such resource paths in a low-effort way. Compatible with ESP8266WebServer for ESP8266 and ESPAsyncWebServer for ESP32. | ||
category=Communication | ||
url=https://github.com/sidoh/path_variable_handlers | ||
architectures=esp8266,esp32 | ||
architectures=* |
Oops, something went wrong.