mirror of
https://gitgud.io/yats/libkiwi.git
synced 2026-06-28 15:05:19 -04:00
Add cookie convenience funcs
Fix test helper func
This commit is contained in:
+5
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user