-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHTTPEscapeSequence.cpp
More file actions
24 lines (19 loc) · 962 Bytes
/
HTTPEscapeSequence.cpp
File metadata and controls
24 lines (19 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <ArduinoHttpServer.h>
void setup() {
// just check to see if escaped characters are parsed correctly
Serial.begin(115200);
delay(100);
Serial.println("TEST - simple");
Serial.print("'index.php?key=value' check for key: ");
Serial.println(ArduinoHttpServer::HttpResource("index.php?key=value").getArgument("key"));
// + must get changed to space
Serial.println("TEST - with space");
Serial.print("'action_page.php?fname=with+space&lname=' check for fname: ");
Serial.println(ArduinoHttpServer::HttpResource("action_page.php?fname=with+space&lname=").getArgument("fname"));
Serial.println("TEST - with special char");
Serial.print("'action_page.php?fname=email%40server.com&lname=' check for fname: ");
Serial.println(ArduinoHttpServer::HttpResource("action_page.php?fname=email%40server.com&lname=").getArgument("fname"));
}
void loop() {
// put your main code here, to run repeatedly:
}