addCustomHeader method

  1. @SupportedPlatforms(platforms: [AndroidPlatform(apiName: 'Profile.addCustomHeader', apiUrl: 'https://developer.android.com/reference/androidx/webkit/Profile#addCustomHeader(java.lang.String,java.lang.String,java.util.Set)', available: '110', note: 'Requires [WebViewFeature.CUSTOM_REQUEST_HEADERS].')])
Future<bool> addCustomHeader({
  1. required String containerId,
  2. required String headerName,
  3. required String headerValue,
  4. Set<String>? originRules,
})

Adds a static request header for matching origins on the Android profile.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'Profile.addCustomHeader',
      apiUrl:
          'https://developer.android.com/reference/androidx/webkit/Profile#addCustomHeader(java.lang.String,java.lang.String,java.util.Set)',
      available: '110',
      note: 'Requires [WebViewFeature.CUSTOM_REQUEST_HEADERS].',
    ),
  ],
)
Future<bool> addCustomHeader({
  required String containerId,
  required String headerName,
  required String headerValue,
  Set<String>? originRules,
}) {
  throw UnimplementedError(
    'addCustomHeader is not implemented on the current platform',
  );
}