File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ The documentation is located at [http://hyperium.github.io/hyper](http://hyperiu
2323
2424## Example
2525
26- Hello World Server:
26+ ### Hello World Server:
2727
2828``` rust
2929extern crate hyper;
@@ -36,17 +36,15 @@ use hyper::server::Response;
3636use hyper :: net :: Fresh ;
3737
3838fn hello (_ : Request , res : Response <Fresh >) {
39- let mut res = res . start (). unwrap ();
40- res . write_all (b " Hello World!" ). unwrap ();
41- res . end (). unwrap ();
39+ res . send (b " Hello World!" ). unwrap ();
4240}
4341
4442fn main () {
4543 Server :: http (" 127.0.0.1:3000" ). unwrap (). handle (hello );
4644}
4745```
4846
49- Client:
47+ ### Client:
5048
5149``` rust
5250extern crate hyper;
@@ -61,7 +59,7 @@ fn main() {
6159 let mut client = Client :: new ();
6260
6361 // Creating an outgoing request.
64- let mut res = client . get (" http://www.gooogle.com /" )
62+ let mut res = client . get (" http://rust-lang.org /" )
6563 // set a header
6664 . header (Connection :: close ())
6765 // let 'er go!
You can’t perform that action at this time.
0 commit comments