[Rust] Changes hard coded body to dynamic parameter name - Fixes #6569 (#7630)

This commit is contained in:
Aykut Akin 2018-02-10 15:27:44 +01:00 committed by William Cheng
parent 854b5012be
commit 0b845a57e4

View File

@ -75,7 +75,7 @@ impl<C: hyper::client::Connect>{{classname}} for {{classname}}Client<C> {
{{#hasBodyParam}}
{{#bodyParams}}
let serialized = serde_json::to_string(&body).unwrap();
let serialized = serde_json::to_string(&{{paramName}}).unwrap();
req.headers_mut().set(hyper::header::ContentType::json());
req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64));
req.set_body(serialized);