summaryrefslogtreecommitdiffstats
path: root/ipfs-api/src/request/block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/src/request/block.rs')
-rw-r--r--ipfs-api/src/request/block.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/ipfs-api/src/request/block.rs b/ipfs-api/src/request/block.rs
index 4dca973..a021f61 100644
--- a/ipfs-api/src/request/block.rs
+++ b/ipfs-api/src/request/block.rs
@@ -6,11 +6,13 @@
// copied, modified, or distributed except according to those terms.
//
+use hyper::Method;
use request::ApiRequest;
#[derive(Serialize)]
pub struct BlockGet<'a> {
- #[serde(rename = "arg")] pub hash: &'a str,
+ #[serde(rename = "arg")]
+ pub hash: &'a str,
}
impl<'a> ApiRequest for BlockGet<'a> {
@@ -23,11 +25,14 @@ impl_skip_serialize!(BlockPut);
impl ApiRequest for BlockPut {
const PATH: &'static str = "/block/put";
+
+ const METHOD: &'static Method = &Method::Post;
}
#[derive(Serialize)]
pub struct BlockRm<'a> {
- #[serde(rename = "arg")] pub hash: &'a str,
+ #[serde(rename = "arg")]
+ pub hash: &'a str,
}
impl<'a> ApiRequest for BlockRm<'a> {
@@ -36,7 +41,8 @@ impl<'a> ApiRequest for BlockRm<'a> {
#[derive(Serialize)]
pub struct BlockStat<'a> {
- #[serde(rename = "arg")] pub hash: &'a str,
+ #[serde(rename = "arg")]
+ pub hash: &'a str,
}
impl<'a> ApiRequest for BlockStat<'a> {