iron-send-file 0.1.1

Serve files with Range header support for Iron library.
docs.rs failed to build iron-send-file-0.1.1
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: iron-send-file-0.1.0

iron-send-file

Serve files with Range header support for Iron library.

Example

extern crate iron;
extern crate iron_send_file;

use std::path::Path;
use iron::prelude::*;
use iron_send_file::send_file;

fn main() {
    Iron::new(|req: &mut Request| {
            let path = Path::new("src/main.rs");

            let res = Response::new();

            send_file(req, res, path)
        })
        .http("localhost:3000")
        .unwrap();
}
$ curl http://localhost:3000 -H "Range: bytes=0-5"
extern

Author

Luka ZakrajŇ°ek

License

MIT