【发布时间】:2017-09-25 04:21:29
【问题描述】:
在我的本地主机 (127.0.0.1:8089) 上使用 Locust 进行了尝试,但它给出了 400 错误请求错误:
import requests
response = requests.post('http://127.0.0.1:8089/swarm', params={"locust_count":10, "hatch_rate":5})
print response.text
回复:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>The browser (or proxy) sent a request that this server could not understand.</p>
我已经通过浏览器确认http://127.0.0.1:8089/ 确实已启动。 locustfile.py 的代码可在 this post 获得。
【问题讨论】:
标签: python python-2.7 locust