当前位置:网站首页>How to use the apipost script - global variables
How to use the apipost script - global variables
2022-06-27 23:36:00 【sik1】
One 、 Global variables Set a global variable :apt.globals.set("key", "value"); It can be used apt.globals.set() Set a custom value , Such as :apt.globals.set("test", " This is a global variable "); apt.globals.set() Methods can be similar to request Method 、response Methods used together . apt.globals.set() and request Method can be used together to get the current request : Such as apt.globals.set("request", request); Get current request details apt.globals.set("url", request.url); Get the currently requested url apt.globals.set("method", request.method); Get the currently requested method apt.globals.set("timeout", request.timeout); Gets the current request timeout apt.globals.set("contentType", request.contentType); Get the currently requested content-type apt.globals.set("bodys", request.request_bodys); Get the current request body apt.globals.set("headers", request.request_headers); Get the current request header apt.globals.set("querys", request.request_querys); Get the currently requested querys apt.globals.set() and response Method to get the current response : Such as apt.globals.set("response", response); Get the response to the current request apt.globals.set("json", response.json); The response is a json When , obtain json Response data in format apt.globals.set("headers", response.headers); Get the current response header apt.globals.set("cookies", response.cookies); Get the response to the current request cookie apt.globals.set("raw", response.raw); Get the original response data apt.globals.set("status", response.raw.status); Get the current response status code (200、301、400 etc. ) apt.globals.set("responseTime", response.raw.responseTime); Get the current response time ( millisecond ) apt.globals.set("type", response.raw.type); Get the current response type (json etc. ) apt.globals.set("responseText", response.raw.responseText); Get the current response text Apipost The official link :https://console.apipost.cn/register?utm_source=10008
Tool download address :https://console.apipost.cn/register?utm_source=10008
边栏推荐
- 【AI应用】NVIDIA Tesla V100S-PCIE-32GB的详情参数
- 获取基因有效长度的N种方法
- [js]var, let,const 的区别
- Excel print settings public header
- Discuz taobaoke website template / Dean taobaoke shopping style commercial version template
- 【Try to Hack】veil-evasion免杀
- 发射,接收天线方向图
- 思源笔记订阅停止直接删云端数据嘛?
- EasyCVR平台路由日志功能的技术实现过程【附代码】
- Usage of vivado vio IP
猜你喜欢

Introduction to quantitative trading

fiddler 监听不到接口怎么办

【剑指Offer】47. 礼物的最大价值

Discuz taobaoke website template / Dean taobaoke shopping style commercial version template

华为伙伴暨开发者大会2022 | 麒麟软件携手华为共建计算产业,共创数智未来

This kind of people began to be robbed by VC with a monthly salary of 80000 yuan

居家办公竟比去公司上班还累?

最新云开发微信余额充电器特效小程序源码

seata

What if Fiddler fails to listen to the interface
随机推荐
图的存储结构
The National University of Singapore 𞓜 uses model free reinforcement learning to evaluate the energy efficiency of the energy efficiency data center
MSP430F5529 单片机 读取 GY-906 红外温度传感器
Feign通过自定义注解实现路径的转义
Cornernet由浅入深理解
【蓝桥杯集训100题】scratch数字计算 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第16题
Usage of vivado vio IP
上手了一个自然语言模型BLOOM
Storage structure of graph
居家办公竟比去公司上班还累?
Sentinel
支持删除,更新任意结点的优先级队列
第 2 章 集成 MP
[network] common request methods
const关键字及其作用(用法),C语言const详解
【IDEA】IDEA 格式化 代码技巧 idea 格式化 会加 <p> 标签
发射,接收天线方向图
新加坡国立大学|采用无模型强化学习方法评估能源效益数据中心的节能情况
Summary of solutions to cross system data consistency problems
Death of 5 yuan youkuang in Yuanqi forest