flyingeinstein / restfully Goto Github PK
View Code? Open in Web Editor NEWArduino library for making Rest compliant APIs on the ESP8266 with embedded Uri arguments
License: MIT License
Arduino library for making Rest compliant APIs on the ESP8266 with embedded Uri arguments
License: MIT License
Just a heads up, when you download the current Arduino version and add restfully via the library manager, it will download an older version and either of the two examples given here on github will not work.
Not sure how much you can influence what the library manager contains.
Thanks for the great library in any case, makes things a lot easier ๐
I keep running into compilation issues when verifying the example sketch that don't make much sense. I didn't capture the compiler output from the first couple issues, but I'll paraphrase
request = requestDoc.to(); -Rest-Esp8266.h - compiler reported not enough arguments provided to DynamicJsonDocument. Resolved by blowing away the library as downloaded by Arduino and replaced with a pull from GitHub
using Exception = Exception; - Node.h:85:42: error: declaration of 'using Exception = class Rest::Exception<Rest::Node >'. Can be resolved by replacing the alias in Node.h
typedef Esp8266RestRequestHandler RestRequestHandler; - Restfully.h:7:1: error: expected constructor, destructor, or type conversion before 'typedef'. Latest error
Seems to me that I'm missing something or my library keeps getting corrupted somehow. Is there anything unique needed to compile the example sketch? I am using ArduinoJson 6.5 and included stdio.h just for chuckles
Environment:
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10),
Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
ArduinoJson 6.12.0
I get a slew of errors on my screen; all appear to be tied to ArduinoJson. I noticed an open issue from earlier this year, but not sure if this is related. The first error I get is:
In file included from C:\Users\ArduinoUser\Documents\Arduino\libraries\Restfully\src/Restfully.h:4:0,
from C:\Users\ArduinoUser\AppData\Local\Temp\arduino_modified_sketch_58277\SimpleRestServer.ino:21:
C:\Users\ArduinoUser\Documents\Arduino\libraries\Restfully\src/Rest-Esp8266.h: In constructor 'ArduinoJson::Request::Request()':
C:\Users\ArduinoUser\Documents\Arduino\libraries\Restfully\src/Rest-Esp8266.h:128:15: error: no matching function for call to 'ArduinoJson6120_000001::BasicJsonDocument<ArduinoJson6120_000001::DefaultAllocator>::BasicJsonDocument()'
When I built against this, I had to peg to the older ArduinoJSON (as you noted) - but was still getting errors about an unavailable sprintf
. I had to add:
#include <stdio.h>
in Rest.h
. I'm happy to submit a PR. ;-)
This is absolutely brilliant, btw. I was going to mail you to say so before. Perfectly what I was looking for, and I was using it to explain last night to my wife how brilliant the internet was.
Thanks for writing it, and writing it so elegantly!
After upgrading the ESP32 board the library is broken
error: 'RestRequest' has not been declared
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.