mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-02 01:31:57 +02:00
re-export rt in web and add main macro (#1575)
This commit is contained in:
@@ -252,6 +252,7 @@ pub struct UrlEncoded<U> {
|
||||
fut: Option<LocalBoxFuture<'static, Result<U, UrlencodedError>>>,
|
||||
}
|
||||
|
||||
#[allow(clippy::borrow_interior_mutable_const)]
|
||||
impl<U> UrlEncoded<U> {
|
||||
/// Create a new future to URL encode a request
|
||||
pub fn new(req: &HttpRequest, payload: &mut Payload) -> UrlEncoded<U> {
|
||||
|
@@ -319,6 +319,7 @@ where
|
||||
U: DeserializeOwned + 'static,
|
||||
{
|
||||
/// Create `JsonBody` for request.
|
||||
#[allow(clippy::borrow_interior_mutable_const)]
|
||||
pub fn new(
|
||||
req: &HttpRequest,
|
||||
payload: &mut Payload,
|
||||
|
@@ -315,6 +315,7 @@ pub struct HttpMessageBody {
|
||||
|
||||
impl HttpMessageBody {
|
||||
/// Create `MessageBody` for request.
|
||||
#[allow(clippy::borrow_interior_mutable_const)]
|
||||
pub fn new(req: &HttpRequest, payload: &mut dev::Payload) -> HttpMessageBody {
|
||||
let mut len = None;
|
||||
if let Some(l) = req.headers().get(&header::CONTENT_LENGTH) {
|
||||
|
Reference in New Issue
Block a user