locust - 如何为蝗虫中的用户共享所有请求的cookie?
问题描述
我想_profiler
为用户的所有请求共享 cookie,无论如何要在 locust 中执行此操作?
self.client.post(
"/customer/account/loginPost/bind/no/",
headers = headers,
data = {
'login[username]': email,
'login[password]': password,
'form_key': form_key
},
cookies={
'_profiler': True
}
)
//Another request in another task, I hope the `_profiler` cookies exists here.
self.client.get('/customer/section/load?sections=cart&force_new_section_timestamp=false',headers=headers)
解决方案
推荐阅读
- javascript - 滚动指示器 JavaScript 仅适用于 HTML 文档
- ruby-on-rails - 无法在控制台中获取 Rails 操作文本
- google-apps-script - 如何在 Google Script 中使用 indexOf 获取参考单元格后使用偏移量
- python - json.decoder.JSONDecodeError:期望','分隔符:第 1 行第 11 列(字符 10)
- javascript - 如何在javascript代码中包含脚本?
- excel - 将列的倍数数据从 xlsx 导入到 powershell cmd
- react-native - 如何坚持语言更改 react-i18next React-native
- java - 您发送给其他用户的消息不会显示在他们的 ChatsFragment 中。只显示给消息的发送者,不显示给接收者
- gnome - 卸载的 gnome 扩展不断重新出现
- node.js - 请解释Express.js的基本服务器设置代码