headers property Null safety

Map<String, dynamic> headers
read / write

HTTP headers to add to the request.

Each pair is added as a header to the request. The key is the header name and the value is the header value. Values follow the rules of HttpHeaders.add.

See also setBasicAuthorization, accept, bearerAuthorization for setting common headers.

Implementation

Map<String, dynamic> headers = {};