initial
This commit is contained in:
commit
ab9a0bd4e2
183 changed files with 20701 additions and 0 deletions
18
src/examples/001_single_request/main.cpp
Normal file
18
src/examples/001_single_request/main.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <http/singlerequest.h>
|
||||
#include <framework/eventloop.h>
|
||||
|
||||
/* Example 001
|
||||
|
||||
Fetch http://frontend.bredbandskollen.se/api/servers, then exit.
|
||||
Write debug log to stderr.
|
||||
|
||||
*/
|
||||
|
||||
int main(int , char *[]) {
|
||||
Task *t = new SingleRequest("MyRequest",
|
||||
"frontend.bredbandskollen.se",
|
||||
"/api/servers");
|
||||
EventLoop::runTask(t);
|
||||
// Note: the object t will be deleted by the event loop.
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue