Locust Error: Httperror (u'405 Client Error: Not Allowed For Url: Https://..../login')
I am trying to do load test of a web server and I disabled the ssl certificate for that site using self.client.verify = False. from locust import HttpLocust, TaskSet, task class U
Solution 1:
You need to dump the dict to a string
Either explicitly:
self.client.post("//oauth/token", json.dumps({”username”...
Or implicitly, using the json parameter:
self.client.post("//oauth/token", json={”username”...
(edited, at first I thought the problem was the double slashes)
Solution 2:
json.dumps(data) is the solution.
@taskdeflogin(self):
self.client.post("//oauth/token", data=json.dumps({"username":"admin","password":"password","provider":"users","grant_type":"password","client_id":2,"client_secret":"somethinghere","scope":"*"}))
Post a Comment for "Locust Error: Httperror (u'405 Client Error: Not Allowed For Url: Https://..../login')"