From 7109126e402f2a4d438d5967680d8aa45d8dfda0 Mon Sep 17 00:00:00 2001 From: Anthony Nowell Date: Sat, 29 Oct 2016 22:40:36 -0600 Subject: [PATCH] Export Body and RequestBuilder for client wrappers --- src/body.rs | 2 ++ src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/body.rs b/src/body.rs index e5884ed..a2da5ba 100644 --- a/src/body.rs +++ b/src/body.rs @@ -1,10 +1,12 @@ use std::io::Read; +/// Body type for a request. pub struct Body { reader: Kind, } impl Body { + /// Instantiate a `Body` from a reader. pub fn new(reader: R) -> Body { Body { reader: Kind::Reader(Box::new(reader), None), diff --git a/src/lib.rs b/src/lib.rs index 7799a37..c83f3bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,8 +47,9 @@ pub use hyper::version::HttpVersion; pub use hyper::Url; pub use url::ParseError as UrlError; -pub use self::client::{Client, Response}; +pub use self::client::{Client, Response, RequestBuilder}; pub use self::error::{Error, Result}; +pub use self::body::Body; mod body; mod client;