New Transparent capture is in preview. Record every app's traffic with no proxy configuration, on Windows, macOS and Linux. Learn more

getFilter Filter

Select exchanges whose HTTP method is GET, the default read verb of the web, useful for cache, header and observability rules.

getFilter is one of the most common building blocks in a Fluxzy rule file. It is the verb you reach for when you want to attach cache, header or tagging behavior to read traffic without worrying about writes.

When to use this filter

Use getFilter when a rule should apply only to HTTP GET requests. GET dominates web traffic and is the safe, idempotent verb for read operations, so it is often the right scope for cache, observability and header actions.

Typical situations:

  • Bypassing cache on every GET while debugging a stale content issue.
  • Adding a tracing header to GET requests against a specific API to follow read traffic across services.
  • Tagging GETs in a capture to count read volume against write volume.

The filter evaluates on the requestHeaderReceivedFromClient scope. It is equivalent to a methodFilter configured for GET, but reads more clearly in rule files that talk in REST verbs.

Real world examples

Bypass cache on read traffic to a specific API

Remove cache control headers from GET requests to the API to make sure the browser fetches a fresh copy on every page load.

rules:
- filter:
    typeKind: FilterCollection
    operation: and
    children:
    - typeKind: HostFilter
      pattern: api.example.com
      operation: Exact
    - typeKind: GetFilter
  actions:
  - typeKind: RemoveCacheAction

Add a tracing header on read traffic

Inject a tracing header on every GET request to the backend so server side logs can correlate the read with the active investigation.

rules:
- filter:
    typeKind: FilterCollection
    operation: and
    children:
    - typeKind: HostFilter
      pattern: api.example.com
      operation: Exact
    - typeKind: GetFilter
  actions:
  - typeKind: AddRequestHeaderAction
    headerName: X-Trace
    headerValue: investigation-742

Tag GET versus non GET for traffic analysis

Tag every GET in the capture so a session report can split read versus write traffic and verify the expected ratio.

rules:
- filter:
    typeKind: GetFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      value: read-traffic

Reference

getFilter

Description

Select exchanges with GET method

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

getFilter

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 exchanges with GET method.

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

.NET reference

View definition of GetFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

Why use getFilter instead of methodFilter?

Both work. getFilter is a shorthand that makes rule files easier to read when the intent is verb specific. Use methodFilter when the method is parametrized or when you need a regex over verbs.

Does it match HEAD requests too?

No. getFilter matches GET only. HEAD is a different HTTP method even though it shares semantics.

Can I invert it?

Yes. Set inverted: true to select every exchange whose method is not GET, that is convenient when you want to act on write traffic only.

Does the filter look at the URL?

No. It only checks the method. Combine it with pathFilter or hostFilter when you need to constrain the target as well.

Learn more about Fluxzy rules