Package org.microproxy.extras
Class ModifyBody.Builder
java.lang.Object
org.microproxy.extras.ModifyBody.Builder
- Enclosing class:
ModifyBody
Builds
ModifyBody.-
Method Summary
Modifier and TypeMethodDescriptionAdds a rule from a spec.add(ModifyBody.Rule rule) Adds a rule.build()Creates the addon.maxBodySize(int bytes) Largest body (as received) buffered for editing; default 10 MiB.
-
Method Details
-
add
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
Largest body (as received) buffered for editing; default 10 MiB.- Parameters:
bytes- the buffer limit in bytes- Returns:
- this builder
-
build
Creates the addon.- Returns:
- the configured addon
-