README.md
1`multipart` Examples
2===========================
3
4These example files show how to use `multipart` with the various crates it integrates with.
5
6These files carry the same licenses as [`multipart` itself](https://github.com/abonander/multipart#license), though this may be lightened to a copyright-free license in the near future.
7
8## Client
9
10Examples for the client-side integrations of `multipart`'s API.
11
12[`hyper_client`](hyper_client.rs)
13---------------------------------
14Author: [abonander]
15
16This example showcases usage of `multipart` with the `hyper::client::Request` API.
17
18```
19$ cargo run --example hyper_client
20```
21
22[`hyper_reqbuilder`](hyper_reqbuilder.rs)
23-----------------------------------------
24Author: [abonander]
25
26This example showcases usage of `multipart` with Hyper's new `Client` API,
27via the lazy-writing capabilities of `multipart::client::lazy`.
28
29```
30$ cargo run --example hyper_reqbuilder
31```
32
33## Server
34
35[`hyper_server`](hyper_server.rs)
36---------------------------------
37Author: [Puhrez]
38
39This example shows how to use `multipart` with a [`hyper::Server`] (http://hyper.rs/) to intercept multipart requests.
40
41```
42$ cargo run --example hyper_server
43```
44
45[`iron`](iron.rs)
46-----------------
47Author: [White-Oak]
48
49This example shows how to use `multipart` with the [Iron web application framework](http://ironframework.io/), via `multipart`'s support
50for the `iron::Request` type.
51
52To run:
53
54```
55$ cargo run --features iron --example iron
56```
57
58[`iron_intercept`](iron_intercept.rs)
59-------------------------------------
60Author: [abonander]
61
62This example shows how to use `multipart`'s specialized `Intercept` middleware with Iron, which reads out all fields and
63files to local storage so they can be accessed arbitrarily.
64
65```
66$ cargo run --features iron --example iron_intercept
67```
68
69[`tiny_http`](tiny_http.rs)
70---------------------------
71Author: [White-Oak]
72
73This example shows how to use `multipart` with the [`tiny_http` crate](https://crates.io/crates/tiny_http), via `multipart`'s support for the `tiny_http::Request` type.
74
75```
76$ cargo run --features tiny_http --example tiny_http
77```
78
79[`hyper_server`](hyper_server.rs)
80---------------------------------
81Author: [Puhrez]
82
83This example shows how to use `multipart` with a [`hyper::Server`] (http://hyper.rs/) to intercept multipart requests.
84
85```
86$ cargo run --example hyper_server
87```
88
89[`nickel`](nickel.rs)
90---------------------
91Author: [iamsebastian]
92
93This example shows how to use `multipart` to handle multipart uploads in [nickel.rs](https://nickel.rs).
94
95```
96$ cargo run --example nickel --features nickel
97```
98
99[Rocket](rocket.rs)
100-------------------
101Author: [abonander]
102
103This example shows how `multipart`'s server API can be used with [Rocket](https://rocket.rs) without
104explicit support (the Rocket folks seem to want to handle `multipart/form-data` behind the scenes
105but haven't gotten around to implementing it yet; this would supercede any integration from `multipart`).
106
107```
108$ cargo run --example rocket --features "rocket"
109```
110
111[iamsebastian]: https://github.com/iamsebastian
112[Puhrez]: https://github.com/puhrez
113[White-Oak]: https://github.com/white-oak
114[abonander]: https://github.com/abonander
115
116