getHeaders method
Implementation
Future<Map<String, String>> getHeaders({
String contentType = 'application/json',
}) async {
String? token = await this.getToken();
Map<String, String> baseHeaders = {
'content-type': contentType,
'accept': 'application/ld+json',
};
if (token != null) {
baseHeaders['authorization'] = 'Bearer $token';
}
return baseHeaders;
}