Rust 的 RESTful 框架 rustful
- 授权协议: MIT
- 开发语言: Rust
- 操作系统: 跨平台
- 软件首页: https://github.com/Ogeon/rustful
- 软件文档: http://ogeon.github.io/rustful/doc/rustful/
软件介绍
rustful 是 Rust 编程语言的一个 RESTful 框架,主要目的是创建一个简单、轻量级的 HTTP 服务应用基础。基于无状态结构,根据路径和 HTTP 方法映射到响应处理器。
示例代码:
//Include rustful_macros during syntax phase to be able to use the macros
#![feature(phase)]
#[phase(plugin)]
extern crate rustful_macros;
extern crate rustful;
extern crate http;
use rustful::{Server, Request, Response};
use http::method::Get;
///Our handler function
fn handler(request: Request, response: &mut Response) {
//Send something nice to the user
try_send!(response, "Hello, user! It looks like this server works fine." while "sending hello");
}
fn main() {
let server = Server::new(8080, router!{"/" => Get: handler});
//Start the server. All code beyond this point is unreachable
server.run();
}
谁说商业直觉是天生的
[美] 戴夫·帕特奈克 (Dev Patnaik)、[美] 彼得·莫特森 (Peter Mortensen) / 马慧 / 万卷出版公司 / 2010-07 / 36.00
《Wired to Care》是帕特奈克集近年来在创新顾问公司 Jump Associates 实务经验,与史丹佛大学教学经验之大成,虽然《Wired to Care》定位为一本用设计创新方法谈企业管理的书,但本书,活像是一本近代的设计史,从以销售为设计目标的Raymond Loewy谈起,到以人为设计中心的OXO GOOD GRIPSSwivelPeeler削皮刀。由此作者向我们揭示了企业如何运......一起来看看 《谁说商业直觉是天生的》 这本书的介绍吧!
