New Fluxzy v2 just shipped. Electron is out, Tauri is in. gRPC ready, 3x smaller install. Learn more

postFilter Filter

Select exchanges using the HTTP POST method, the canonical verb for resource creation and form submissions.

postFilter is the dedicated selector for HTTP POST exchanges in a Fluxzy rule. It mirrors the other verb specific filters (getFilter, putFilter, deleteFilter, patchFilter) and keeps your YAML readable when you only care about write operations or form submissions. Pair it with any action below to act on the POST side of an API.

When to use this filter

Reach for postFilter when a rule should only apply to POST requests. POST is the workhorse verb for form submissions, resource creation, and a wide range of RPC style endpoints. The filter is a convenience wrapper around methodFilter with the verb fixed to POST, which keeps the YAML compact.

Typical situations:

  • Adding an authorization header to every POST hitting an internal API.
  • Tagging all form submissions so they group together in the capture view.
  • Throttling POST requests to reproduce slow saves during a checkout flow.

The filter evaluates on the requestHeaderReceivedFromClient scope, so the method is known as soon as the request line is parsed. Combine it with pathFilter, jsonRequestFilter or formRequestFilter for finer scoping.

Real world examples

Tag every POST call for audit

Apply a tag to all POST requests so write operations stand out in the Fluxzy capture view when reviewing API traffic.

rules:
- filter:
    typeKind: PostFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      value: post

Add a bearer token to POST calls on the API

Attach a bearer token only to POST requests heading to the API host, leaving GET requests untouched.

rules:
- filter:
    typeKind: FilterCollection
    children:
    - typeKind: PostFilter
    - typeKind: HostFilter
      pattern: api.example.com
  actions:
  - typeKind: AddAuthorizationBearerAction
    token: dev-token-123

Throttle POST submissions to a checkout endpoint

Slow down every POST to /checkout to reproduce a customer report about timeouts on slow networks.

rules:
- filter:
    typeKind: FilterCollection
    children:
    - typeKind: PostFilter
    - typeKind: PathFilter
      pattern: /checkout
      operation: StartsWith
  actions:
  - typeKind: AverageThrottleAction
    bandwidthBytesPerSeconds: 16384

Reference

postFilter

Description

Select POST (request method) only exchanges.

Evaluation scope

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

YAML configuration name

postFilter

Settings

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

Example of usage

The following examples apply a comment to the filtered exchange

Select POST (request method) only exchanges.

rules:
- filter:
    typeKind: PostFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

.NET reference

View definition of PostFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

How does postFilter differ from methodFilter?

postFilter is a convenience wrapper around methodFilter with the verb fixed to POST. The rule file stays shorter and clearer. Use methodFilter when you need a regex, a custom verb, or to match several verbs at once.

Does the filter match case insensitive POST variants?

Yes. HTTP methods are normalized before comparison, so post, Post and POST all match.

Can I invert the filter to exclude POST?

Yes. Set inverted: true to select every exchange that is not a POST request.

What is the difference with formRequestFilter?

postFilter matches by verb only. formRequestFilter matches by Content-Type (application/x-www-form-urlencoded or multipart/form-data) regardless of verb. Use postFilter for the verb, formRequestFilter for the body shape.

Learn more about Fluxzy rules