HTTP API client utility functions (get, post, etc.)

This commit is contained in:
Ignotus Peverell
2017-05-25 17:21:56 -07:00
parent ac553493f1
commit f45cfe97f2
5 changed files with 89 additions and 21 deletions
+3 -3
View File
@@ -38,15 +38,15 @@ pub struct ChainApi {
impl ApiEndpoint for ChainApi {
type ID = String;
type T = Tip;
type OP_IN = ();
type OP_OUT = ();
type OP_IN = ();
type OP_OUT = ();
fn operations(&self) -> Vec<Operation> {
vec![Operation::Get]
}
fn get(&self, id: String) -> ApiResult<Tip> {
self.chain_store.head().map_err(|e| ApiError::Internal(e.to_string()))
self.chain_store.head().map_err(|e| Error::Internal(e.to_string()))
}
}