Skip to content

Commit 47e03e3

Browse files
authored
Merge pull request #235 from drivasperez/main
Tweak main lib docs
2 parents f54a240 + 3cfe085 commit 47e03e3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
//!
2222
//! # How does HTTP work?
2323
//!
24-
//! We couldn't possibly explain _all_ of HTTP here, as there's [5 versions](enum.Version.html) of
25-
//! the protocol now, and lots of extensions. But at its core there are only a few concepts you
26-
//! need to know about.
24+
//! We couldn't possibly explain _all_ of HTTP here: there are [5 versions](enum.Version.html) of
25+
//! the protocol now, and lots of extensions. But, at its core, there are only a few concepts you
26+
//! need to know about in order to understand what this crate does.
2727
//!
2828
//! ```txt
2929
//! request
@@ -39,7 +39,7 @@
3939
//! does some work, and sends back a [`Response`](struct.Response.html).
4040
//!
4141
//! The `Url` works as a way to subdivide an IP address/domain into further addressable resources.
42-
//! The `Method` indicates what kind of operation we're trying perform (get something, submit
42+
//! The `Method` indicates what kind of operation we're trying to perform (get something, submit
4343
//! something, update something, etc.)
4444
//!
4545
//! ```txt
@@ -54,9 +54,9 @@
5454
//! ```
5555
//!
5656
//! A `Response` consists of a [`StatusCode`](enum.StatusCode.html),
57-
//! [`Headers`](struct.Headers.html), and optional [`Body`](struct.Body.html). The client then
57+
//! [`Headers`](struct.Headers.html), and optionally a [`Body`](struct.Body.html). The client then
5858
//! decodes the `Response`, and can then operate on it. Usually the first thing it does is check
59-
//! the status code to see if it was successful or not, and then operates on the headers.
59+
//! the status code to see if its `Request` was successful or not, and then moves on to the information contained within the headers.
6060
//!
6161
//! ```txt
6262
//! Response
@@ -72,25 +72,25 @@
7272
//! requests. It needs to be encoded in a specific way (all lowercase ASCII, only some special
7373
//! characters) so we use the [`HeaderName`](headers/struct.HeaderName.html) and
7474
//! [`HeaderValue`](headers/struct.HeaderValue.html) structs rather than strings to ensure that.
75-
//! Also another interesting thing about this is that it's valid to have multiple instances of the
76-
//! same header name. Which is why `Headers` allows inserting multiple values, and always returns a
77-
//! vector of headers for each key.
75+
//! Another interesting thing about this is that it's valid to have multiple instances of the
76+
//! same header name. This is why `Headers` allows inserting multiple values, and always returns a
77+
//! [`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) of headers for each key.
7878
//!
7979
//! When reading up on HTTP you might frequently hear a lot of jargon related to ther underlying
8080
//! protocols. But even newer HTTP versions (`HTTP/2`, `HTTP/3`) still fundamentally use the
8181
//! request/response model we've described so far.
8282
//!
8383
//! # The Body Type
8484
//!
85-
//! In HTTP [`Body`](struct.Body.html) types are optional. But funamentally they're streams of
86-
//! bytes with a specific encoding, also known as [`Mime` type](struct.Mime.html). The `Mime` can
85+
//! In HTTP, [`Body`](struct.Body.html) types are optional. The content of a `Body` is a stream of
86+
//! bytes with a specific encoding; this encoding is its [`Mime` type](struct.Mime.html). The `Mime` can
8787
//! be set using the [`set_content_type`](struct.Request.html#method.set_content_type) method, and
88-
//! there are many different `Mime` types possible.
88+
//! there are many different possible `Mime` types.
8989
//!
9090
//! `http-types`' `Body` struct can take anything that implements
9191
//! [`AsyncBufRead`](https://docs.rs/futures/0.3.1/futures/io/trait.AsyncBufRead.html) and stream
9292
//! it out. Depending on the version of HTTP used, the underlying bytes will be transmitted
93-
//! differently. But as a rule: if you know the size of the body, it's usually more efficient to
93+
//! differently. As a rule, if you know the size of the body it's usually more efficient to
9494
//! declare it up front. But if you don't, things will still work.
9595
9696
#![deny(missing_debug_implementations, nonstandard_style)]

0 commit comments

Comments
 (0)