http?
Written as http?(argnum flags):options in a transform expression.
| Minimum arguments | 1 |
| Maximum arguments | 1 |
| Default arguments | 1 |
| Argument modes | SINGLE_PRIMITIVE |
Documentation
Section titled “Documentation”Extract a specific query parameter from a URL.
Features:
- Extracts the value of a named query parameter
- Returns None if the parameter doesn’t exist
- Handles both encoded and unencoded parameter names/values
- Preserves the original encoding of the parameter value
Behavior:
- Only extracts the first occurrence if multiple parameters with same name exist
- Returns the raw parameter value without additional decoding/encoding
- Case-sensitive parameter name matching
| Flag | Letter |
|---|---|
| noncaptive_input | I |
Examples
Section titled “Examples”Basic parameter extraction
Section titled “Basic parameter extraction”Input args: ["https://example.com/search?q=hello&lang=en"]Transforms: "http?:q"Output: "hello"Non-existent parameter
Section titled “Non-existent parameter”Input args: ["https://example.com/search?q=hello"]Transforms: "http?:page"Output: nullEncoded parameter name
Section titled “Encoded parameter name”Input args: ["https://example.com?%24filter=name%3Djohn"]Transforms: "http?:$filter"Output: "name=john"Multiple parameters
Section titled “Multiple parameters”Input args: ["https://example.com?color=red&color=blue"]Transforms: "http?:color"Output: "blue"Empty parameter value
Section titled “Empty parameter value”Input args: ["https://example.com?empty=&full=value"]Transforms: "http?:empty"Output: ""