mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
make cookies optional
This commit is contained in:
@@ -11,6 +11,7 @@ use actix_rt::Runtime;
|
||||
use actix_server_config::ServerConfig;
|
||||
use actix_service::{IntoNewService, NewService, Service};
|
||||
use bytes::Bytes;
|
||||
#[cfg(feature = "cookies")]
|
||||
use cookie::Cookie;
|
||||
use futures::future::{lazy, Future};
|
||||
|
||||
@@ -262,6 +263,7 @@ impl TestRequest {
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
/// Set cookie for this request
|
||||
pub fn cookie(mut self, cookie: Cookie) -> Self {
|
||||
self.req.cookie(cookie);
|
||||
|
Reference in New Issue
Block a user