diff --git a/Cargo.toml b/Cargo.toml index 52a3d272..bb42c502 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "goose" -version = "0.12.1" +version = "0.12.2-dev" authors = ["Jeremy Andrews "] edition = "2018" description = "A load testing framework inspired by Locust." diff --git a/src/goose.rs b/src/goose.rs index 9b948d45..7473632a 100644 --- a/src/goose.rs +++ b/src/goose.rs @@ -1913,7 +1913,8 @@ impl GooseUser { /// /// let builder = Client::builder() /// .user_agent(APP_USER_AGENT) - /// .cookie_store(true); + /// .cookie_store(true) + /// .gzip(true); /// ``` /// /// Alternatively, you can use this function to manually build a @@ -1968,6 +1969,24 @@ impl GooseUser { /// Ok(()) /// } /// ``` + /// + /// Reqwest also supports + /// [`brotli`](https://docs.rs/reqwest/*/reqwest/struct.ClientBuilder.html#method.brotli) and + /// [`deflate`](https://docs.rs/reqwest/*/reqwest/struct.ClientBuilder.html#method.deflate) compression. + /// + /// To enable either, you must enable the features in your load test's `Cargo.toml`, for example: + /// ```text + /// reqwest = { version = "^0.11.4", default-features = false, features = [ + /// "brotli", + /// "cookies", + /// "deflate", + /// "gzip", + /// "json", + /// ] } + /// ``` + /// + /// Once enabled, you can add `.brotli(true)` and/or `.deflate(true)` to your custom Client::builder(), + /// similar to how is documented above. pub async fn set_client_builder(&self, builder: ClientBuilder) -> Result<(), GooseTaskError> { *self.client.lock().await = builder.build()?;