1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

remove cookie support from -http (#2065)

This commit is contained in:
Rob Ede
2021-04-09 18:07:10 +01:00
committed by GitHub
parent c72d77065d
commit 44c55dd036
40 changed files with 1335 additions and 566 deletions

View File

@@ -1,14 +1,11 @@
//! Test helpers for actix http client to use during testing.
use actix_http::http::header::IntoHeaderPair;
use actix_http::http::{StatusCode, Version};
#[cfg(feature = "cookies")]
use actix_http::{
cookie::{Cookie, CookieJar},
http::header::{self, HeaderValue},
};
use actix_http::{h1, Payload, ResponseHead};
use bytes::Bytes;
#[cfg(feature = "cookies")]
use crate::cookie::{Cookie, CookieJar};
use crate::ClientResponse;
/// Test `ClientResponse` builder
@@ -92,6 +89,8 @@ impl TestResponse {
#[cfg(feature = "cookies")]
for cookie in self.cookies.delta() {
use actix_http::http::header::{self, HeaderValue};
head.headers.insert(
header::SET_COOKIE,
HeaderValue::from_str(&cookie.encoded().to_string()).unwrap(),