e.stopPropagation()}>
{rule ? '编辑' : '添加'} API 字段
Target Key
最终 JSON 中的字段名
Request URL
{ showUrlVars = !showUrlVars; showBodyVars = false; }} class="cursor-pointer whitespace-nowrap rounded-md border border-gray-300 px-2 py-2 text-xs text-gray-600 hover:bg-gray-50" title="插入变量" > {{x}}
{#if showUrlVars}
{#each headers as h (h)}
insertVariable('url', h)} class="w-full cursor-pointer px-3 py-1.5 text-left text-xs text-gray-700 hover:bg-blue-50" > {h}
{/each}
{/if}
支持 {{列名}} 模板变量
Request Method
GET
POST
Headers
+ 添加
{#if headerEntries.length > 0}
{#each headerEntries as entry, i (i)}
removeHeader(i)} class="cursor-pointer flex-shrink-0 text-gray-400 hover:text-red-500" aria-label="删除此 Header" >
{/each}
{:else}
暂无 Header
{/if}
{#if method === 'POST'}
Request Body
{ showBodyVars = !showBodyVars; showUrlVars = false; }} class="cursor-pointer text-xs text-blue-600 hover:text-blue-700" > 插入变量
{#if showBodyVars}
{#each headers as h (h)}
insertVariable('body', h)} class="w-full cursor-pointer px-3 py-1.5 text-left text-xs text-gray-700 hover:bg-blue-50" > {h}
{/each}
{/if}
{/if}
Response Extractor
从接口返回 JSON 中提取值的路径(如 data.result.value)
Fallback Value
API 请求失败时的默认值
取消
保存