mirror of https://github.com/fafhrd91/actix-web
re-export useful http items at top level
This commit is contained in:
parent
ea5de27fa9
commit
0e86b1c512
|
@ -35,7 +35,7 @@ mod config;
|
|||
#[cfg(feature = "compress")]
|
||||
pub mod encoding;
|
||||
mod extensions;
|
||||
mod header;
|
||||
pub mod header;
|
||||
mod helpers;
|
||||
mod http_message;
|
||||
mod message;
|
||||
|
@ -63,7 +63,14 @@ pub use self::request::Request;
|
|||
pub use self::response::Response;
|
||||
pub use self::response_builder::ResponseBuilder;
|
||||
pub use self::service::HttpService;
|
||||
pub use self::header::ContentEncoding;
|
||||
pub use self::message::ConnectionType;
|
||||
|
||||
pub use ::http::{StatusCode, Version, Method};
|
||||
pub use ::http::{uri, uri::Uri};
|
||||
|
||||
// deprecate this mish-mash of random items
|
||||
#[deprecated = "Everything in this module is available elsewhere."]
|
||||
pub mod http {
|
||||
//! Various HTTP related types.
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
use std::cell::{Ref, RefCell, RefMut};
|
||||
use std::net;
|
||||
use std::rc::Rc;
|
||||
use std::{
|
||||
cell::{Ref, RefCell, RefMut},
|
||||
net,
|
||||
rc::Rc,
|
||||
};
|
||||
|
||||
use bitflags::bitflags;
|
||||
|
||||
use crate::extensions::Extensions;
|
||||
use crate::header::HeaderMap;
|
||||
use crate::http::{header, Method, StatusCode, Uri, Version};
|
||||
use crate::{
|
||||
header::{self, HeaderMap},
|
||||
Extensions, Method, StatusCode, Uri, Version,
|
||||
};
|
||||
|
||||
/// Represents various types of connection
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
|
|
|
@ -14,12 +14,10 @@ use futures_core::Stream;
|
|||
|
||||
use crate::{
|
||||
body::{Body, BodyStream, ResponseBody},
|
||||
error::Error,
|
||||
extensions::Extensions,
|
||||
header::{IntoHeaderPair, IntoHeaderValue},
|
||||
http::{header, Error as HttpError, StatusCode},
|
||||
error::{Error, HttpError},
|
||||
header::{self, IntoHeaderPair, IntoHeaderValue},
|
||||
message::{BoxedResponseHead, ConnectionType, ResponseHead},
|
||||
Response,
|
||||
Extensions, Response, StatusCode,
|
||||
};
|
||||
|
||||
/// An HTTP response builder.
|
||||
|
|
Loading…
Reference in New Issue