@@ -106,13 +106,15 @@ TEST_FIXTURE(uri_address, outside_ssl_json,
106
106
using namespace web ::http::client;
107
107
using namespace concurrency ::streams;
108
108
109
- // Create an HTTP request.
110
- uri_builder playlistUri (" https://www.googleapis.com/youtube/v3/playlistItems?" );
111
- playlistUri.append_query (" part" ," snippet" );
112
- playlistUri.append_query (" playlistId" , " UUF1hMUVwlrvlVMjUGOZExgg" );
113
- playlistUri.append_query (" key" ," AIzaSyAviHxf_y0SzNoAq3iKqvWVE4KQ0yylsnk" );
109
+ // Create URI for:
110
+ // https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UUF1hMUVwlrvlVMjUGOZExgg&key=AIzaSyAviHxf_y0SzNoAq3iKqvWVE4KQ0yylsnk
111
+ uri_builder playlistUri (U (" https://www.googleapis.com/youtube/v3/playlistItems?" ));
112
+ playlistUri.append_query (U (" part" ),U (" snippet" ));
113
+ playlistUri.append_query (U (" playlistId" ), U (" UUF1hMUVwlrvlVMjUGOZExgg" ));
114
+ playlistUri.append_query (U (" key" ), U (" AIzaSyAviHxf_y0SzNoAq3iKqvWVE4KQ0yylsnk" ));
115
+
116
+ // Send request
114
117
web::http::client::http_client playlistClient (playlistUri.to_uri ());
115
-
116
118
playlistClient.request (methods::GET).then ([=](http_response playlistResponse) -> pplx::task<json::value>
117
119
{
118
120
return playlistResponse.extract_json ();
@@ -122,10 +124,10 @@ TEST_FIXTURE(uri_address, outside_ssl_json,
122
124
for (const auto & i : jsonArray[U (" items" )])
123
125
{
124
126
auto name = i.second [U (" snippet" )][U (" title" )].to_string ();
125
- std::cout << name.c_str () << std::endl ;
127
+ casablanca_printf ( name.c_str ()) ;
126
128
count++;
127
129
}
128
- VERIFY_ARE_EQUAL (3 , count);
130
+ VERIFY_ARE_EQUAL (3 , count); // Update this accordingly, if the number of items changes
129
131
}).wait ();
130
132
}
131
133
0 commit comments