serialize_pairs
No overview available.
def serialize_pairs(
pairs: iterable
) - > string
Converts a collection of key-value pairs into a URL-encoded query string format. Use this to prepare data for inclusion in a URI or for application/x-www-form-urlencoded request bodies.
Parameters
| Name | Type | Description |
|---|---|---|
| pairs | iterable | A collection of tuples or a dictionary containing the key-value pairs to be serialized. |
Returns
| Type | Description |
|---|---|
string | A URL-encoded string of key-value pairs joined by ampersands, or an empty string if no pairs are provided. |