Accessing Restful API
Which is the best way in Wt to access a (non-Wt) Restful API? Should JS be used, or are there other methods?
Thanks in advance!
RE: Accessing Restful API - Added by Roel Standaert 3 months ago
Usually we're doing the communication with APIs server side, using
Wt::Http::Client. It's a fairly simple one that suffices for many uses. Other C++ HTTP client libraries exist if Wt's doesn't suffice though.
RE: Accessing Restful API - Added by Bert Cuypers 3 months ago
This is exactly what I needed! Thanks a lot!
RE: Accessing Restful API - Added by Bert Cuypers about 1 month ago
Is it also possible to use this Wt::Http::Client without any WApplication object existing?
I'd like to have communication with the APIs at night when there are no users connected with my app...
Thanks in advance
RE: Accessing Restful API - Added by Roel Standaert about 1 month ago
Yes. All the HTTP client needs is an
io_service. If you create one with the default constructor inside of a
WApplication it will automatically use the
io_service of the
WServer (and post all of its events to that
Use this constructor with an
io_service for which at least one thread is running
run() to create a
Client outside of a