formUrlEncodedRequestFilter is the narrow counterpart to formRequestFilter. Use it when the multipart variant must be excluded, typically because you only care about classic key value form submissions.
Use formUrlEncodedRequestFilter when you want to act only on urlencoded form posts, the encoding produced by HTML forms that do not include file fields. The filter matches by inspecting the Content-Type request header for application/x-www-form-urlencoded.
Typical situations:
The filter fires on the requestHeaderReceivedFromClient scope. If you also need to cover multipart uploads, use the broader formRequestFilter. If you want any request with a body, use hasRequestBodyFilter.
Return a deterministic redirect when an urlencoded login is posted so the frontend can be exercised without a working auth backend.
rules:
- filter:
typeKind: FilterCollection
operation: and
children:
- typeKind: PathFilter
pattern: /login
operation: Exact
- typeKind: FormUrlEncodedRequestFilter
actions:
- typeKind: MockedResponseAction
response:
statusCode: 302
headers:
- name: Location
value: /dashboard
Tag every urlencoded form post so you can audit which endpoints still rely on the legacy encoding and need migration to JSON.
rules:
- filter:
typeKind: FormUrlEncodedRequestFilter
actions:
- typeKind: ApplyTagAction
tag:
value: legacy-form-post
Remove a vendor specific tracking header from urlencoded form submissions in a privacy focused testing session.
rules:
- filter:
typeKind: FormUrlEncodedRequestFilter
actions:
- typeKind: DeleteRequestHeaderAction
headerName: X-Vendor-Track
Select request sending 'application/x-www-form-urlencoded' body. Filtering is made by inspecting value of Content-Type header
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
formUrlEncodedRequestFilter
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 having request header dnt: 1.
rules:
- filter:
typeKind: RequestHeaderFilter
headerName: dnt
pattern: 1
operation: Exact
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
Select exchanges issued by Chrome 112 by checking User-Agent.
rules:
- filter:
typeKind: RequestHeaderFilter
headerName: User-Agent
pattern: 'Chrome/112 '
operation: Contains
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of FormUrlEncodedRequestFilter for .NET integration.
This filter has no related filter
No. multipart/form-data is excluded by design. Use formRequestFilter to cover both encodings, or pair this filter with a separate multipart rule.
Fluxzy inspects the Content-Type request header. The body itself is not parsed, so a header that lies about the encoding will be trusted.
Yes. The filter accounts for the standard parameter forms such as application/x-www-form-urlencoded; charset=UTF-8.
Yes. Wrap it in a filterCollection with a postFilter or putFilter when the method must also be constrained.
No. MIME type comparisons are case insensitive per RFC, so Application/X-WWW-Form-Urlencoded matches just as well.