Class ModifyBody.Builder

java.lang.Object
org.microproxy.extras.ModifyBody.Builder
Enclosing class:
ModifyBody

public static final class ModifyBody.Builder extends Object
Builds ModifyBody.
  • Method Details

    • add

      public ModifyBody.Builder add(String spec)
      Adds a rule from a spec.
      Parameters:
      spec - a spec of the form [|flow-filter]|regex|[@]replacement
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the spec is invalid
    • add

      Adds a rule.
      Parameters:
      rule - the rule to append
      Returns:
      this builder
    • maxBodySize

      public ModifyBody.Builder maxBodySize(int bytes)
      Largest body (as received) buffered for editing; default 10 MiB.
      Parameters:
      bytes - the buffer limit in bytes
      Returns:
      this builder
    • build

      public ModifyBody build()
      Creates the addon.
      Returns:
      the configured addon