summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-02-09 19:32:09 +0000
committerMonty Taylor <mordred@inaugust.com>2019-02-09 19:32:09 +0000
commit00a92c15c869a5e43c1e941a653d1793285c7ad1 (patch)
tree783fc64f63600b69aeada13ac5fea7d116632339
parentb50ca80db92535ef0bbfdf6bd63f53a063a3c085 (diff)
Use uri builder to build the build url
-rw-r--r--zuul-preview/main.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/zuul-preview/main.cc b/zuul-preview/main.cc
index 510af7b..70df06e 100644
--- a/zuul-preview/main.cc
+++ b/zuul-preview/main.cc
@@ -26,9 +26,10 @@ using namespace std;
26int main(int, char**) 26int main(int, char**)
27{ 27{
28 web::http::client::http_client client("https://zuul.opendev.org"); 28 web::http::client::http_client client("https://zuul.opendev.org");
29 auto uri = web::uri_builder("/api/tenant/openstack/build");
30 uri.append_path("75031cad206c4014ad7a3387091d15ab");
29 auto response = client.request( 31 auto response = client.request(
30 web::http::methods::GET, 32 web::http::methods::GET, uri.to_string()).get();
31 "/api/tenant/openstack/build/75031cad206c4014ad7a3387091d15ab").get();
32 // body is a web::json::value 33 // body is a web::json::value
33 auto body = response.extract_json().get(); 34 auto body = response.extract_json().get();
34 cout << response.status_code() << endl; 35 cout << response.status_code() << endl;