Add cookie convenience funcs

Fix test helper func
This commit is contained in:
y a t s
2026-06-18 11:44:25 -04:00
parent 72840af90e
commit 92438691f1
5 changed files with 49 additions and 37 deletions
+5 -2
View File
@@ -18,6 +18,8 @@ const _USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefo
type KF struct {
client http.Client
domain *url.URL
Cookies jar
}
// Supply your own http.Client to route through any proxies.
@@ -37,8 +39,9 @@ func NewKF(hc http.Client, host *url.URL) (KF, error) {
}
return KF{
client: hc,
domain: u,
client: hc,
domain: u,
Cookies: jar{hc.Jar},
}, nil
}