diff --git a/Sources/dafl_project_flutter/lib/api/api.dart b/Sources/dafl_project_flutter/lib/api/api.dart index 574d995..c89ff72 100644 --- a/Sources/dafl_project_flutter/lib/api/api.dart +++ b/Sources/dafl_project_flutter/lib/api/api.dart @@ -58,14 +58,12 @@ class Api { getCurrentlyPlayingTrack() async { var url = Uri.https('api.spotify.com', 'v1/me/player/currently-playing'); - print('$token_type $access_token'); - var response = await client.post(url, headers: { + var response = await client.get(url, headers: { 'Authorization': '$token_type $access_token', 'Content-Type': 'application/json' }); - // Problem while trying to get body - print(access_token); - print(response.statusCode); + // Implement traitement of datas + print(response.body); } // for state value