patchFilter is the dedicated selector for HTTP PATCH exchanges in a Fluxzy rule. It mirrors the other verb specific filters (getFilter, postFilter, putFilter, deleteFilter) and keeps your YAML readable when you only care about partial updates. Pair it with any action below to act on the write side of a REST API.
Reach for patchFilter when a rule should only apply to PATCH requests, the canonical verb for partial updates in REST APIs. It is a convenience wrapper around methodFilter with the verb fixed to PATCH, which keeps the YAML compact and readable.
Typical situations:
The filter evaluates on the requestHeaderReceivedFromClient scope, so the method is known as soon as the request line is parsed. Combine it with pathFilter or jsonRequestFilter for finer scoping.
Apply a tag to all PATCH requests so partial updates stand out in the Fluxzy capture view when reviewing API traffic.
rules:
- filter:
typeKind: PatchFilter
actions:
- typeKind: ApplyTagAction
tag:
value: patch
Attach a bearer token only to PATCH requests heading to the internal API host, leaving GET and other verbs unmodified.
rules:
- filter:
typeKind: FilterCollection
children:
- typeKind: PatchFilter
- typeKind: HostFilter
pattern: api.internal.example.com
actions:
- typeKind: AddAuthorizationBearerAction
token: dev-token-123
Slow down every PATCH call to simulate a constrained network during a save operation, useful when validating optimistic UI behavior.
rules:
- filter:
typeKind: PatchFilter
actions:
- typeKind: AverageThrottleAction
bandwidthBytesPerSeconds: 32000
Select exchanges with PATCH 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
patchFilter
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 PATCH method.
rules:
- filter:
typeKind: PatchFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of PatchFilter for .NET integration.
The following filters are related to this filter:
patchFilter is a convenience wrapper around methodFilter with the verb hardcoded to PATCH. The rule file stays shorter and clearer. Use methodFilter when you need a regex or a custom verb.
Yes. HTTP methods are normalized before comparison, so patch, Patch and PATCH all match.
Yes. Set inverted: true to select every exchange that is not a PATCH request.
patchFilter matches PATCH (partial update). putFilter matches PUT (full replacement). Both are write verbs in REST APIs but they convey different semantics.