1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 05:35:08 +02:00

added Logger middleware

This commit is contained in:
Nikolay Kim
2019-03-06 19:19:27 -08:00
parent 561a89b8b3
commit 244fff9e0a
9 changed files with 279 additions and 150 deletions

View File

@@ -1,12 +1,12 @@
//! Middleware for setting default response headers
use std::rc::Rc;
use actix_http::http::header::{HeaderName, HeaderValue, CONTENT_TYPE};
use actix_http::http::{HeaderMap, HttpTryFrom};
use actix_service::{Service, Transform};
use futures::future::{ok, FutureResult};
use futures::{Future, Poll};
use crate::http::header::{HeaderName, HeaderValue, CONTENT_TYPE};
use crate::http::{HeaderMap, HttpTryFrom};
use crate::service::{ServiceRequest, ServiceResponse};
/// `Middleware` for setting default response headers.
@@ -147,10 +147,10 @@ where
#[cfg(test)]
mod tests {
use actix_http::http::header::CONTENT_TYPE;
use actix_service::FnService;
use super::*;
use crate::http::header::CONTENT_TYPE;
use crate::test::{block_on, TestRequest};
use crate::{HttpResponse, ServiceRequest};