Comments (2)
可以使用 {{ host | default("127.0.0.1") }}
作为含默认值的变量
from templates.
可以使用
{{ host | default("127.0.0.1") }}
作为含默认值的变量
试过了,没有成功,会报错,而且编辑那一条时 Request URL 中的 {{ host | default("127.0.0.1") }}
会自动被URL编码,就没有再试了。HAR模板内容如下
[{"request":{"method":"POST","url":"http://{{host | default(\"127.0.0.1\")}}:{{port}}/login","headers":[{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Accept-Encoding","value":"gzip, deflate"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9"},{"name":"Cache-Control","value":"max-age=0"},{"name":"Connection","value":"keep-alive"},{"name":"Content-Length","value":"45"},{"name":"Content-Type","value":"application/x-www-form-urlencoded"},{"name":"Host","value":"{{host | default(\"127.0.0.1\")}}:{{port}}"},{"name":"Origin","value":"http://{{host | default(\"127.0.0.1\")}}:{{port}}"},{"name":"Referer","value":"http://{{host | default(\"127.0.0.1\")}}:{{port}}/login"},{"name":"Upgrade-Insecure-Requests","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"}],"cookies":[],"data":"email={{email|urlencode}}&password={{password|urlencode}}","mimeType":"application/x-www-form-urlencoded"},"rule":{"success_asserts":[{"re":"302","from":"status"}],"failed_asserts":[{"re":"请输入用户名和密码","from":"content"}],"extract_variables":[{"name":"cookie","re":"Set-Cookie: (.*?); expires","from":"header"}]}}]
from templates.
Related Issues (20)
- hostloc_qd 评论区
- SCI_Great_-_优质学术插件分享平台 评论区
- 龙的天空 评论区
- deepfacelab中文网 评论区
- RenPy中文论坛 评论区
- 4K世界 评论区 HOT 2
- CnGame维基网 评论区 HOT 1
- HiFiNi_音乐 评论区 HOT 1
- 金蝶KDcloud签到
- 123云盘分享网 评论区
- Dukou 评论区
- SteamTools论坛 评论区 HOT 2
- 隔壁网 评论区 HOT 3
- 无线技术论坛 评论区
- 粤梦缘 评论区
- Moto17摩托开源技术论坛 评论区
- 知轩藏书 评论区 HOT 1
- 奇书阁 评论区
- 慢慢游社区 评论区 HOT 1
- 雨晨分享站 评论区
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.