@@ -4,7 +4,7 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header {
44 use torrust_tracker_rest_api_client:: common:: http:: Query ;
55 use torrust_tracker_rest_api_client:: connection_info:: ConnectionInfo ;
66 use torrust_tracker_rest_api_client:: v1:: client:: {
7- AUTH_BEARER_TOKEN_HEADER_PREFIX , Client , headers_with_auth_token, headers_with_request_id,
7+ AUTH_BEARER_TOKEN_HEADER_PREFIX , ApiHttpClient , headers_with_auth_token, headers_with_request_id,
88 } ;
99 use torrust_tracker_test_helpers:: logging:: logs_contains_a_line_with;
1010 use torrust_tracker_test_helpers:: { configuration, logging} ;
@@ -20,7 +20,7 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header {
2020
2121 let token = env. get_connection_info ( ) . api_token . unwrap ( ) ;
2222
23- let response = Client :: new ( env. get_connection_info ( ) )
23+ let response = ApiHttpClient :: new ( env. get_connection_info ( ) )
2424 . unwrap ( )
2525 . get_request_with_query ( "stats" , Query :: default ( ) , Some ( headers_with_auth_token ( & token) ) )
2626 . await ;
@@ -48,7 +48,7 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header {
4848 . expect ( "the auth token is not a valid header value" ) ,
4949 ) ;
5050
51- let response = Client :: new ( env. get_connection_info ( ) )
51+ let response = ApiHttpClient :: new ( env. get_connection_info ( ) )
5252 . unwrap ( )
5353 . get_request_with_query ( "stats" , Query :: default ( ) , Some ( headers) )
5454 . await ;
@@ -83,7 +83,7 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header {
8383
8484 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
8585
86- let response = Client :: new ( connection_info)
86+ let response = ApiHttpClient :: new ( connection_info)
8787 . unwrap ( )
8888 . get_request_with_query ( "stats" , Query :: default ( ) , Some ( headers) )
8989 . await ;
@@ -103,7 +103,7 @@ mod given_that_the_token_is_only_provided_in_the_query_param {
103103 use torrust_tracker_axum_rest_api_server:: testing:: environment:: Started ;
104104 use torrust_tracker_rest_api_client:: common:: http:: { Query , QueryParam } ;
105105 use torrust_tracker_rest_api_client:: connection_info:: ConnectionInfo ;
106- use torrust_tracker_rest_api_client:: v1:: client:: { Client , TOKEN_PARAM_NAME , headers_with_request_id} ;
106+ use torrust_tracker_rest_api_client:: v1:: client:: { ApiHttpClient , TOKEN_PARAM_NAME , headers_with_request_id} ;
107107 use torrust_tracker_test_helpers:: logging:: logs_contains_a_line_with;
108108 use torrust_tracker_test_helpers:: { configuration, logging} ;
109109 use uuid:: Uuid ;
@@ -120,7 +120,7 @@ mod given_that_the_token_is_only_provided_in_the_query_param {
120120
121121 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
122122
123- let response = Client :: new ( connection_info)
123+ let response = ApiHttpClient :: new ( connection_info)
124124 . unwrap ( )
125125 . get_request_with_query (
126126 "stats" ,
@@ -144,7 +144,7 @@ mod given_that_the_token_is_only_provided_in_the_query_param {
144144
145145 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
146146
147- let response = Client :: new ( connection_info)
147+ let response = ApiHttpClient :: new ( connection_info)
148148 . unwrap ( )
149149 . get_request_with_query (
150150 "stats" ,
@@ -173,7 +173,7 @@ mod given_that_the_token_is_only_provided_in_the_query_param {
173173
174174 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
175175
176- let response = Client :: new ( connection_info)
176+ let response = ApiHttpClient :: new ( connection_info)
177177 . unwrap ( )
178178 . get_request_with_query (
179179 "stats" ,
@@ -203,15 +203,15 @@ mod given_that_the_token_is_only_provided_in_the_query_param {
203203 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
204204
205205 // At the beginning of the query component
206- let response = Client :: new ( connection_info)
206+ let response = ApiHttpClient :: new ( connection_info)
207207 . unwrap ( )
208208 . get_request ( & format ! ( "torrents?token={token}&limit=1" ) )
209209 . await ;
210210
211211 assert_eq ! ( response. status( ) , 200 ) ;
212212
213213 // At the end of the query component
214- let response = Client :: new ( env. get_connection_info ( ) )
214+ let response = ApiHttpClient :: new ( env. get_connection_info ( ) )
215215 . unwrap ( )
216216 . get_request ( & format ! ( "torrents?limit=1&token={token}" ) )
217217 . await ;
@@ -227,7 +227,7 @@ mod given_that_not_token_is_provided {
227227 use torrust_tracker_axum_rest_api_server:: testing:: environment:: Started ;
228228 use torrust_tracker_rest_api_client:: common:: http:: Query ;
229229 use torrust_tracker_rest_api_client:: connection_info:: ConnectionInfo ;
230- use torrust_tracker_rest_api_client:: v1:: client:: { Client , headers_with_request_id} ;
230+ use torrust_tracker_rest_api_client:: v1:: client:: { ApiHttpClient , headers_with_request_id} ;
231231 use torrust_tracker_test_helpers:: logging:: logs_contains_a_line_with;
232232 use torrust_tracker_test_helpers:: { configuration, logging} ;
233233 use uuid:: Uuid ;
@@ -244,7 +244,7 @@ mod given_that_not_token_is_provided {
244244
245245 let connection_info = ConnectionInfo :: anonymous ( env. get_connection_info ( ) . origin ) ;
246246
247- let response = Client :: new ( connection_info)
247+ let response = ApiHttpClient :: new ( connection_info)
248248 . unwrap ( )
249249 . get_request_with_query ( "stats" , Query :: default ( ) , Some ( headers_with_request_id ( request_id) ) )
250250 . await ;
@@ -263,7 +263,7 @@ mod given_that_not_token_is_provided {
263263mod given_that_token_is_provided_via_get_param_and_authentication_header {
264264 use torrust_tracker_axum_rest_api_server:: testing:: environment:: Started ;
265265 use torrust_tracker_rest_api_client:: common:: http:: { Query , QueryParam } ;
266- use torrust_tracker_rest_api_client:: v1:: client:: { Client , TOKEN_PARAM_NAME , headers_with_auth_token} ;
266+ use torrust_tracker_rest_api_client:: v1:: client:: { ApiHttpClient , TOKEN_PARAM_NAME , headers_with_auth_token} ;
267267 use torrust_tracker_test_helpers:: { configuration, logging} ;
268268
269269 #[ tokio:: test]
@@ -276,7 +276,7 @@ mod given_that_token_is_provided_via_get_param_and_authentication_header {
276276
277277 let non_authorized_token = "NonAuthorizedToken" ;
278278
279- let response = Client :: new ( env. get_connection_info ( ) )
279+ let response = ApiHttpClient :: new ( env. get_connection_info ( ) )
280280 . unwrap ( )
281281 . get_request_with_query (
282282 "stats" ,
0 commit comments