httpx_qs.enums.merge_policy module

Policy that determines how to handle keys that already exist in the query string.

class httpx_qs.enums.merge_policy.MergePolicy(*values)[source]

Bases: str, Enum

Policy that determines how to handle keys that already exist in the query string.

Values:

COMBINE: (default) Combine existing and new values into a list (preserving order: existing then new). REPLACE: Replace existing value with the new one (last-wins). KEEP: Keep the existing value, ignore the new one (first-wins). ERROR: Raise a ValueError if a key collision occurs.

COMBINE = 'combine'
ERROR = 'error'
KEEP = 'keep'
REPLACE = 'replace'