performance - 如何在 Autocannon 中传递标头和 x-www-form-urlencoded 正文
问题描述
我正在尝试在Autocannon POST 请求中传递标头和 x-www-form-urlencoded 正文,但我的响应始终是:
0 2xx responses, 5 non 2xx responses
命令行示例:
autocannon -c 1 -a 5 -H Authorization="Bearer xxxx",Content-Type="application/x-www-form-urlencoded" -b "Key"="Value" http://host.com:8080/path
解决方案
对每个标头使用 -H 标志,如下所示: autocannon -c 1 -a 5 -H "Authorization":"Bearer xxxx" -H "Content-Type":"application/x-www-form-urlencoded" -b '{ “键”=“值”}' http://host.com:8080/path
推荐阅读
- sql - 错误:没有与 ON CONFLICT 规范匹配的唯一或排除约束
- reactjs - 是否可以从反应代码生成 figma 插件?
- react-native - 在进行本机测试时将空的 Redux Store 传递给组件
- amazon-web-services - AWS RDS IAM 角色凭证轮换
- css - 如果溢出出现在自然分词的位置,我如何确保出现省略号?
- swift - 如何使用 diffabledatasource 更新领域?
- c# - C# 使用扩展方法设置变量值
- java - 运行 maven 全新安装时出错。我正在使用 CDI。有人能帮我吗?
- marklogic - 运行 gradle mlExportBatchesToDirectory 时出现“超出 GC 开销限制”错误
- python - pip install windows 后无法使用 coockiecutter 命令