summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/src/client.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-17 00:09:46 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-17 00:09:46 -0700
commit6aee40ac9538f9391c9e630efddf4b39fdad5a50 (patch)
tree1f8964407f78e8379e4dbbac3ee4ef117ae5b7f4 /rust/fatcat-api/src/client.rs
parent0f6ac22fee0332627ef86f10306d67b997396b61 (diff)
downloadfatcat-6aee40ac9538f9391c9e630efddf4b39fdad5a50.tar.gz
fatcat-6aee40ac9538f9391c9e630efddf4b39fdad5a50.zip
fix api spec
Diffstat (limited to 'rust/fatcat-api/src/client.rs')
-rw-r--r--rust/fatcat-api/src/client.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/rust/fatcat-api/src/client.rs b/rust/fatcat-api/src/client.rs
index 0c1345de..4fa084f9 100644
--- a/rust/fatcat-api/src/client.rs
+++ b/rust/fatcat-api/src/client.rs
@@ -657,13 +657,18 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn editgroup_post(&self, context: &Context) -> Box<Future<Item = EditgroupPostResponse, Error = ApiError> + Send> {
+ fn editgroup_post(&self, param_body: models::Editgroup, context: &Context) -> Box<Future<Item = EditgroupPostResponse, Error = ApiError> + Send> {
let url = format!("{}/v0/editgroup", self.base_path);
+ let body = serde_json::to_string(&param_body).expect("impossible to fail to serialize");
+
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
let mut custom_headers = hyper::header::Headers::new();
+ let request = request.body(&body);
+
+ custom_headers.set(ContentType(mimetypes::requests::EDITGROUP_POST.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);