Use restclient to load a zuul build
This commit is contained in:
parent
1dbacebd70
commit
0101e1cd39
|
@ -18,22 +18,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
#include <restclient-cpp/restclient.h>
|
||||||
|
|
||||||
// for convenience
|
// for convenience
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
json j;
|
|
||||||
j["pi"] = 3.14;
|
RestClient::Response r = RestClient::get("http://zuul.opendev.org/api/tenant/openstack/build/75031cad206c4014ad7a3387091d15ab");
|
||||||
j["happy"] = true;
|
|
||||||
|
json j = json::parse(r.body);
|
||||||
|
|
||||||
cout << j.dump(4) << endl;
|
cout << j.dump(4) << endl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue