Add example "cureq". (#330)
Contrary to smoke-test, this takes full URLs on the commandline and prints their contents to stdout. This makes it easier to test behavior with specific URLs. I hope to later add flags for various behaviors like printing headers, following redirects, enabling / disabling cookies, and verbose output. Also add a useful debug line when receiving a cookie header.
This commit is contained in:
committed by
GitHub
parent
7222931b24
commit
6f86ee7f93
@@ -411,6 +411,10 @@ fn save_cookies(unit: &Unit, resp: &Response) {
|
||||
return;
|
||||
}
|
||||
let cookies = headers.into_iter().flat_map(|header_value| {
|
||||
debug!(
|
||||
"received 'set-cookie: {}' from {} {}",
|
||||
header_value, unit.method, unit.url
|
||||
);
|
||||
match Cookie::parse(header_value.to_string()) {
|
||||
Err(_) => None,
|
||||
Ok(c) => Some(c),
|
||||
|
||||
Reference in New Issue
Block a user