removeHeader method

void removeHeader(
  1. String headerKey
)

removeHeader function is to Remove header by headerKey It requires header key to delete the header returns Stack Instance

Example:

final stack = contentstack.Stack(apiKey, deliveryToken, environment);
stack = stack..removeHeader('headerKey');

Implementation

void removeHeader(String headerKey) {
  if (headerKey != null) {
    if (headers.containsKey(headerKey)) {
      headers.remove(headerKey);
    }
  }
}