removeSchemeFromHeaderStr static method
Removed the requested scheme from the header
Implementation
static String removeSchemeFromHeaderStr(String? header, String scheme) {
if (header == null || header.isEmpty) {
return '';
}
AuthHeaders auth = AuthHeaders.fromHeaderStr(header);
if (auth.isEmpty || !auth.containsScheme(scheme)) {
return header;
}
auth.removeItemByScheme(scheme);
return auth.toString();
}