diff --git a/awc/CHANGES.md b/awc/CHANGES.md index 4ae63493e..cd9635074 100644 --- a/awc/CHANGES.md +++ b/awc/CHANGES.md @@ -16,6 +16,8 @@ * Use non-consuming builder pattern for `ClientRequest`. +* `ClientRequest::json()` accepts reference instead of object. + * `ClientResponse::body()` does not consume response object. diff --git a/awc/src/request.rs b/awc/src/request.rs index 807a28978..78404b31b 100644 --- a/awc/src/request.rs +++ b/awc/src/request.rs @@ -499,7 +499,7 @@ impl ClientRequest { /// Set a JSON body and generate `ClientRequest` pub fn send_json( &mut self, - value: T, + value: &T, ) -> impl Future< Item = ClientResponse>, Error = SendRequestError,