setHeader method
The setHeader
function takes in a key
and value
and returns a new instance
of Algolia
with the extraHeaders
updated
Args: key (String): The header key value (String): The value of the header.
Returns: A new instance of Algolia with the extraHeaders map updated.
Implementation
Algolia setHeader(String key, String value) {
var map = extraHeaders;
map[key] = value;
return Algolia._(
applicationId: applicationId,
apiKey: _apiKey,
extraHeaders: _headers,
);
}