apply method

  1. @override
void apply(
  1. Options options
)
override

Adds the custom header headerName: headerValue to the request options headers.

Initialises the headers map if it has not yet been set, then writes headerName with the value headerValue.

Implementation

@override
void apply(Options options) {
  options.headers ??= {};
  options.headers![headerName] = headerValue;
}