deleteFilter is a verb specific shortcut around methodFilter. It makes rule files self documenting when the intent is to act on destructive requests, which is one of the most common reasons engineers reach for a method filter in the first place.
Use deleteFilter when you want a rule to apply specifically to HTTP DELETE requests. DELETE is the method clients use for destructive operations, so it often deserves special treatment such as confirmation, blocking on a staging environment, or extra logging.
Typical situations:
The filter fires on the requestHeaderReceivedFromClient scope. It is equivalent to methodFilter configured for DELETE, but reads more clearly in rule files that focus on REST verbs.
Reject every DELETE request targeted at the production API while a deploy freeze is in effect, to prevent accidental cleanups.
rules:
- filter:
typeKind: FilterCollection
operation: and
children:
- typeKind: HostFilter
pattern: api.example.com
operation: Exact
- typeKind: DeleteFilter
actions:
- typeKind: RejectWithStatusCodeAction
statusCode: 403
Tag every DELETE in the capture so the post run report can count teardown operations and verify the test exercised the full lifecycle.
rules:
- filter:
typeKind: DeleteFilter
actions:
- typeKind: ApplyTagAction
tag:
value: lifecycle-teardown
Append every DELETE request line to a file so you can later diff it against the expected cleanup plan.
rules:
- filter:
typeKind: DeleteFilter
actions:
- typeKind: FileAppendAction
filename: /tmp/fluxzy-deletes.log
text: "{request:url}\n"
Select exchanges with DELETE method
Evaluation scope defines the timing where this filter will be applied.
requestHeaderReceivedFromClient This scope occurs the moment fluxzy parsed the request header receiveid from client
deleteFilter
This filter has no specific characteristic
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| inverted | boolean | Negate the filter result | false |
The following examples apply a comment to the filtered exchange
Select exchanges with DELETE method.
rules:
- filter:
typeKind: DeleteFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of DeleteFilter for .NET integration.
The following filters are related to this filter:
deleteFilter is a shorthand for methodFilter with method set to DELETE. The behavior is identical, deleteFilter is just easier to read in YAML.
Yes, on its own deleteFilter matches every DELETE regardless of destination. Combine it with hostFilter or authorityFilter to scope by target.
Yes. Set inverted: true to select every exchange that is not a DELETE. That is useful when you want to apply a rule to safe methods only.
Yes. The filter matches on the literal DELETE method token, which is the same for HTTP and WebDAV.