Crate austenite[stability] [-]  [+] [src]

Austenite

A library for building Iron handlers that implements HTTP header handling and content negotiation.

#[macro_use] extern crate austenite;
use austenite::handle;
use iron::{Iron, Listening, Request, Response};

struct GetOkContent;
resource_handler!(GetOkContent);
impl Resource for GetOkContent {
    fn handle_ok(&self, req: &Request, resp: &mut Response)
               -> IronResult<Response>
    {
      resp.set_mut((status::Ok, "hello"));
      Ok(Response::new())
    }
}

fn start_iron() -> Listening {
  Iron::new(Resource).listen((address,0u16)).unwrap();
}

Reexports

pub use hyper_headers::*;
pub use resource::Resource;

Modules

content_neg

Content Negotiation

hyper_headers

Headers

resource

A Resource