@@ -69,9 +69,8 @@ public function getUserByEmail(string $email)
6969 Log::debug (sprintf ("ExternalUserApi::getUserByEmail email %s " , $ email ));
7070
7171 return $ this ->invokeWithRetry (function () use ($ email ) {
72-
7372 $ query = [
74- 'access_token ' => $ this ->getAccessToken ()
73+ 'access_token ' => $ this ->getAccessToken (),
7574 ];
7675
7776 $ params = [
@@ -83,6 +82,11 @@ public function getUserByEmail(string $email)
8382 }
8483
8584 $ response = $ this ->client ->get ('/api/v1/users ' , [
85+ 'headers ' => [
86+ 'Accept ' => 'application/json ' ,
87+ 'Cache-Control ' => 'no-cache, no-store, max-age=0, must-revalidate ' ,
88+ 'Pragma ' => 'no-cache ' ,
89+ ],
8690 'query ' => $ query ,
8791 ]
8892 );
@@ -162,12 +166,16 @@ public function getUserById(int $id)
162166 Log::debug (sprintf ("ExternalUserApi::getUserById id %s " , $ id ));
163167
164168 return $ this ->invokeWithRetry (function () use ($ id ) {
165-
166169 $ query = [
167- 'access_token ' => $ this ->getAccessToken ()
170+ 'access_token ' => $ this ->getAccessToken (),
168171 ];
169172
170173 $ response = $ this ->client ->get (sprintf ('/api/v1/users/%s ' , $ id ), [
174+ 'headers ' => [
175+ 'Accept ' => 'application/json ' ,
176+ 'Cache-Control ' => 'no-cache, no-store, max-age=0, must-revalidate ' ,
177+ 'Pragma ' => 'no-cache ' ,
178+ ],
171179 'query ' => $ query ,
172180 ]
173181 );
@@ -237,7 +245,6 @@ public function getUserRegistrationRequest(string $email)
237245 Log::debug (sprintf ("ExternalUserApi::getUserRegistrationRequest email %s " , $ email ));
238246
239247 return $ this ->invokeWithRetry (function () use ($ email ) {
240-
241248 $ query = [
242249 'access_token ' => $ this ->getAccessToken (),
243250 ];
@@ -251,6 +258,11 @@ public function getUserRegistrationRequest(string $email)
251258 }
252259
253260 $ response = $ this ->client ->get ('/api/v1/user-registration-requests ' , [
261+ 'headers ' => [
262+ 'Accept ' => 'application/json ' ,
263+ 'Cache-Control ' => 'no-cache, no-store, max-age=0, must-revalidate ' ,
264+ 'Pragma ' => 'no-cache ' ,
265+ ],
254266 'query ' => $ query ,
255267 ]);
256268
0 commit comments