getRefreshResponse method

  1. @Deprecated('This function is deprecated until further actions are taken my mangadex to introduce the new login methods')
Future<Response> getRefreshResponse(
  1. String refreshToken
)
inherited

Endpoint used: POST /auth/refresh

Takes in a refreshToken token and returns a http response of a new refresh token

Implementation

@Deprecated(
    'This function is deprecated until further actions are taken my mangadex to introduce the new login methods')
Future<http.Response> getRefreshResponse(String refreshToken) async {
  final unencodedPath = '/auth/refresh';
  final uri = 'https://$AUTHORITY$unencodedPath';
  var response = await http.post(Uri.parse(uri),
      headers: {HttpHeaders.contentTypeHeader: 'application/json'},
      body: jsonEncode({'token': '$refreshToken'}));
  return response;
}