Fixes #64 Support for cookies

expose a SetJar method to set a http.CookieJar to the http client
This commit is contained in:
Steffen Brüheim 2022-11-09 16:48:38 +01:00 committed by Christoph Polcin
parent 200a600c02
commit 60ec5ad560

View File

@ -83,6 +83,11 @@ func (c *Client) SetTransport(transport http.RoundTripper) {
c.c.Transport = transport c.c.Transport = transport
} }
// SetJar exposes the ability to set a cookie jar to the client.
func (c *Client) SetJar(jar http.CookieJar) {
c.c.Jar = jar
}
// Connect connects to our dav server // Connect connects to our dav server
func (c *Client) Connect() error { func (c *Client) Connect() error {
rs, err := c.options("/") rs, err := c.options("/")