getRefreshResponse function Null safety
- String refresh
Implementation
Future<http.Response> getRefreshResponse(String refresh) 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': '$refresh'}));
return response;
}