mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
ClientRequest::json() accepts reference instead of object
This commit is contained in:
parent
89a0a50e14
commit
2d43489278
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
* Use non-consuming builder pattern for `ClientRequest`.
|
* Use non-consuming builder pattern for `ClientRequest`.
|
||||||
|
|
||||||
|
* `ClientRequest::json()` accepts reference instead of object.
|
||||||
|
|
||||||
* `ClientResponse::body()` does not consume response object.
|
* `ClientResponse::body()` does not consume response object.
|
||||||
|
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ impl ClientRequest {
|
|||||||
/// Set a JSON body and generate `ClientRequest`
|
/// Set a JSON body and generate `ClientRequest`
|
||||||
pub fn send_json<T: Serialize>(
|
pub fn send_json<T: Serialize>(
|
||||||
&mut self,
|
&mut self,
|
||||||
value: T,
|
value: &T,
|
||||||
) -> impl Future<
|
) -> impl Future<
|
||||||
Item = ClientResponse<impl Stream<Item = Bytes, Error = PayloadError>>,
|
Item = ClientResponse<impl Stream<Item = Bytes, Error = PayloadError>>,
|
||||||
Error = SendRequestError,
|
Error = SendRequestError,
|
||||||
|
Loading…
Reference in New Issue
Block a user