RuleAction constructor

RuleAction({
  1. required RuleActionType type,
  2. Redirect? redirect,
  3. List<ModifyHeaderInfo>? requestHeaders,
  4. List<ModifyHeaderInfo>? responseHeaders,
})

Implementation

RuleAction({
  /// The type of action to perform.
  required RuleActionType type,

  /// Describes how the redirect should be performed. Only valid for redirect
  /// rules.
  Redirect? redirect,

  /// The request headers to modify for the request. Only valid if
  /// RuleActionType is "modifyHeaders".
  List<ModifyHeaderInfo>? requestHeaders,

  /// The response headers to modify for the request. Only valid if
  /// RuleActionType is "modifyHeaders".
  List<ModifyHeaderInfo>? responseHeaders,
}) : _wrapped = $js.RuleAction(
        type: type.toJS,
        redirect: redirect?.toJS,
        requestHeaders: requestHeaders?.toJSArray((e) => e.toJS),
        responseHeaders: responseHeaders?.toJSArray((e) => e.toJS),
      );