当前位置:网站首页>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
边栏推荐
- [从零开始学习FPGA编程-48]:视野篇 - 智能传感器的发展与应用
- Use of go log package log
- 居家办公竟比去公司上班还累?
- 电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!
- 【Try to Hack】veil-evasion免杀
- [js]var, let, const
- Feign implements path escape through custom annotations
- 文献综述如何挑选文献进行阅读,比如我的检索结果有200多篇根本看不完,如何进行文献挑选呢?...
- 【AI应用】NVIDIA Tesla V100S-PCIE-32GB的详情参数
- fiddler 监听不到接口怎么办
猜你喜欢

良/恶性乳腺肿瘤预测(逻辑回归分类器)

Ice cream or snow "high"?

手把手教你移植 tinyriscv 到FPGA上

【蓝桥杯集训100题】scratch数字计算 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第16题
![[try to hack] kill evaluation](/img/93/e623e25dc4dec1f656227c7651577e.png)
[try to hack] kill evaluation

MySQL十八:写语句的执行过程

官宣!Apache Doris 从 Apache 孵化器毕业,正式成为 Apache 顶级项目!

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

Summary of solutions to cross system data consistency problems

撰写外文时怎样引用中文文献?
随机推荐
Stream + Nacos
小芯片chiplet技术杂谈
fiddler 监听不到接口怎么办
解决新版chrome跨域问题:cookie丢失以及samesite属性问题「建议收藏」
【IDEA】IDEA 格式化 代码技巧 idea 格式化 会加 <p> 标签
vivado VIO IP的用法
EXCEL 打印设置公共表头
沉寂了一段时间 ,我又出来啦~
The latest cloud development wechat balance charger special effect applet source code
CUDA error:out of memory caused by insufficient video memory of 6G graphics card
seata
第 2 章 集成 MP
【剑指Offer】48. 最长不含重复字符的子字符串
Realization of kaggle cat dog recognition by pytorch
虽然TCGA数据库有33种癌症
The file or assembly 'cefsharp.core.runtime.dll' or one of its dependencies could not be loaded. Is not a valid Win32 Application. (exception from hresult:0x800700c1)
[learn FPGA programming from scratch -48]: Vision - development and application of intelligent sensors
如何设置企业微信群机器人定时发消息?
量化交易入门教程
Prediction of benign / malignant breast tumors (logistic regression classifier)