Browse Source

Make the method actually fetch something

changes/91/636791/1
Monty Taylor 3 months ago
parent
commit
9791caef35
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      zuul-preview/main.cc

+ 6
- 1
zuul-preview/main.cc View File

@@ -25,6 +25,11 @@ using namespace std;
25 25
 
26 26
 int main(int, char**)
27 27
 {
28
-
29 28
   web::http::client::http_client client("https://zuul.opendev.org");
29
+  auto response = client.request(
30
+    web::http::methods::GET,
31
+     "/api/tenant/openstack/build/75031cad206c4014ad7a3387091d15ab").get();
32
+  auto body = response.extract_json().get();
33
+  cout << response.status_code() << endl;
34
+  cout << body.serialize() << endl;
30 35
 }

Loading…
Cancel
Save