-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return_response a valid request argument #229
Comments
No, it's not. Good catch! Since Locust mostly wraps python-requests, part of that docstring had been copied from requests. Requests has changed it's method signature in later versions which Locust has upgraded to, without updating the docstring. Thanks! |
Hi @heyman Is it possible to log the requests being sent in locust or do I need to drop down to python-requests? |
with self.client.get("/", catch_response=True) as response:
print response.request.headers |
Do you want to print log something for every request? There's different ways to go about that, but you shouldn't need to modify either locust nor python-requests. For example, you could add a get method on your Locust class, which prints something and then calls class MyLocust(HttpLocust):
def get(self, *args, **kwargs):
response = self.client.get(*args, **kwargs)
print response.headers
return response Then you'd have to update so that you'd use that method for making requests instead of |
@heyman Thanks for the advice. I just wanted to ensure the correct headers were being sent in the request. |
Is return_response a valid request argument?
locust/locust/clients.py
Line 95 in 067c124
The text was updated successfully, but these errors were encountered: