Skip to content

Commit

Permalink
feat(http): add cookie for client
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarisW committed Oct 31, 2024
1 parent 4e19070 commit c73efcc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions volo-http/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,11 @@ mod client_tests {
dns::{parse_target, DnsResolver},
get, Client, DefaultClient, Target,
};
#[cfg(feature = "cookie")]
use crate::client::cookie::CookieLayer;
use crate::{
body::BodyConversion, client::cookie::CookieLayer, error::client::status_error,
response::ResponseExt, utils::consts::HTTP_DEFAULT_PORT, ClientBuilder,
body::BodyConversion, error::client::status_error, response::ResponseExt,
utils::consts::HTTP_DEFAULT_PORT, ClientBuilder,
};

#[derive(Deserialize)]
Expand Down Expand Up @@ -1286,6 +1288,7 @@ mod client_tests {
assert!(resp.is_ok());
}

#[cfg(feature = "cookie")]
#[tokio::test]
async fn cookie_store() {
let mut builder = Client::builder().layer_inner(CookieLayer::new(Default::default()));
Expand Down

0 comments on commit c73efcc

Please sign in to comment.