headers property
Getter for the HTTP headers
Implementation
Map<String, String> get headers {
return _headers;
}
To apply the new headers in existing realtime channels, manually unsubscribe and resubscribe these channels.
Implementation
set headers(Map<String, String> headers) {
_headers.clear();
_headers.addAll({
...Constants.defaultHeaders,
...headers,
});
rest.headers
..clear()
..addAll(_headers);
functions.headers
..clear()
..addAll(_headers);
storage.headers
..clear()
..addAll(_headers);
auth.headers
..clear()
..addAll({
...Constants.defaultHeaders,
..._getAuthHeaders(),
...headers,
});
// To apply the new headers in the realtime client,
// manually unsubscribe and resubscribe to all channels.
realtime.headers
..clear()
..addAll(_headers);
}