headersForQuery method
Expand a query into HTTP headers
Implementation
@protected
Map<String, String> headersForQuery([Query? query]) {
if ((query == null || query.providerArgs['headers'] == null) && defaultHeaders != null) {
return defaultHeaders!;
}
return {}
..addAll({'Content-Type': 'application/json'})
..addAll(defaultHeaders ?? <String, String>{})
..addAll(query?.providerArgs['headers'] ?? <String, String>{});
}