1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 01:39:33 +00:00

ClientRequest::json() accepts reference instead of object

This commit is contained in:
Nikolay Kim 2019-04-01 17:53:30 -07:00
parent 89a0a50e14
commit 2d43489278
2 changed files with 3 additions and 1 deletions

View file

@ -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.

View file

@ -499,7 +499,7 @@ impl ClientRequest {
/// Set a JSON body and generate `ClientRequest`
pub fn send_json<T: Serialize>(
&mut self,
value: T,
value: &T,
) -> impl Future<
Item = ClientResponse<impl Stream<Item = Bytes, Error = PayloadError>>,
Error = SendRequestError,