Object-oriented libraries for working with HTTP and REST API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
api/test/test.cpp

25 lines
522 B

#include <iostream>
#include "../lib/api.hpp"
using namespace std;
int main() {
defapi myDef({"add", "delete", "update"}, {"id", "key", "value"});
// cout << myDef.keys[2];
myDef.necessary("add", {"id", "key", "value"});
myDef.necessary("delete", {"id"});
myDef.necessary("update", {"id"});
myDef.necessary("update", {"value"});
// cout << myDef.val_matrix["delete"].empty();
api myApi(&myDef, "GET /update/?id=1&value=tru eHTTP/1.1\n");
cout << myApi.object["value"];
}