doc fixes

This commit is contained in:
Martin Algesten
2018-06-22 11:11:59 +02:00
parent 28348f1e51
commit 48dcdeb92a
3 changed files with 21 additions and 9 deletions

View File

@@ -201,7 +201,16 @@ impl Request {
///
/// The `Content-Length` header is not set because we can't know the length of the reader.
///
/// ```
/// use std::io::Cursor;
///
/// let text = "Hello there!\n";
/// let read = Cursor::new(text.to_string().into_bytes());
///
/// let resp = ureq::post("/somewhere")
/// .set("Content-Type", "text/plain")
/// .send(read);
/// ```
pub fn send<R>(&mut self, reader: R) -> Response
where
R: Read + Send + 'static,