API — Locust 2.7.0 documentation
docs.locust.io/en/stable/api.htmlResponse class ¶. This class actually resides in the python-requests library, since that’s what Locust is using to make HTTP requests, but it’s included in the API docs for locust since it’s so central when writing locust load tests. You can also look at the Response class at the requests documentation. class Response.
API — Locust 2.7.0 documentation
docs.locust.io › en › stableA Response class that also acts as a context manager that provides the ability to manually control if an HTTP request should be marked as successful or a failure in Locust’s statistics. This class is a subclass of Response with two additional methods: success and failure. failure (exc) ¶ Report the response as a failure.