Debian Codegraph @

README.md

raw symbols SCIP
1 # rust-http-range
2
3 HTTP Range header parser. It parses Range HTTP header string as per RFC 2616.
4
5 Inspired by Go's net/http library.
6
7 ## Overview
8
9 Example usage:
10
11 ```rust
12 extern crate http_range;
13
14 use http_range::{HttpRange};
15
16 fn main() {
17 let range_str = "bytes=0-8";
18 let size = 10;
19
20 match HttpRange::parse(range_str, size) {
21 Ok(rngs) => for r in rngs {
22 println!("Start {}, length {}", r.start, r.length)
23 },
24 Err(err) => println!("HttpRange parse error: {:?}", err)
25 };
26 }
27 ```
28
29 ## Used in
30
31 - [iron-send-file](https://github.com/bancek/iron-send-file)
32
33 ## Author
34
35 Luka Zakrajšek
36
37 ## License
38
39 MIT