jsonrpc-http-server 2.1.0

Rust http server using JSONRPC 2.0.
docs.rs failed to build jsonrpc-http-server-2.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: jsonrpc-http-server-18.0.0

jsonrpc-core

Rust http server using JSON-RPC 2.0.

Build Status

Documentation

Example

Cargo.toml

[dependencies]
jsonrpc-http-server = "1.1"

main.rs

extern crate jsonrpc_core;
extern crate jsonrpc_http_server;
 
use jsonrpc_core::*;
use jsonrpc_http_server::*;
 
struct SayHello;
impl MethodCommand for SayHello {
    fn execute(&mut self, _params: Option<Params>) -> Result<Value, Error> {
        Ok(Value::String("hello".to_string()))
    }
}
 
fn main() {
    let mut io = IoHandler::new();
    io.add_method("say_hello", SayHello);
    let server = Server::new(io, 1);
    server.start("127.0.0.1:3030".to_string());
}