For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/runtime/functions/toQueryString.md.
  • 简体中文
  • Function: toQueryString()

    function toQueryString(params: Record<string, string | number | undefined>): string;

    Defined in: sapi/runtime/tools.ts:258

    将键值字典编码为标准 URL 查询字符串(例如 ?a=1&b=2);若参数为空则返回空字符串。

    Parameters

    ParameterTypeDescription
    paramsRecord<string, string | number | undefined>待序列化的键值对象。

    Returns

    string

    格式化后的查询字符串(含开头的 ?)。