Use restclient to load a zuul build

This commit is contained in:
James E. Blair 2019-02-09 08:46:59 -08:00
parent 1dbacebd70
commit 0101e1cd39
1 changed files with 5 additions and 7 deletions

View File

@ -18,22 +18,20 @@
*/
#include <config.h>
#include <pthread.h>
#include <json.hpp>
#include <restclient-cpp/restclient.h>
// for convenience
using json = nlohmann::json;
using namespace std;
int main(int, char**)
{
json j;
j["pi"] = 3.14;
j["happy"] = true;
RestClient::Response r = RestClient::get("http://zuul.opendev.org/api/tenant/openstack/build/75031cad206c4014ad7a3387091d15ab");
json j = json::parse(r.body);
cout << j.dump(4) << endl;
}