rq: github.com/ddo/rq/client/jar Index | Files

package jar

import "github.com/ddo/rq/client/jar"


Package Files

helper.go jar.go

type Jar Uses

type Jar struct {
    // contains filtered or unexported fields

Jar contains stdlib http cookie jar

func New Uses

func New() *Jar

New returns new empty cookie jar

func (*Jar) Clear Uses

func (j *Jar) Clear(hostname string) (err error)

Clear deletes all cookies by set max-age=-1

func (*Jar) Delete Uses

func (j *Jar) Delete(hostname string, name string) (err error)

Delete deletes a cookie by set max-age=-1

func (*Jar) Get Uses

func (j *Jar) Get(hostname string) (cookies []*http.Cookie, err error)

Get returns all cookies by hostname

func (*Jar) GetByName Uses

func (j *Jar) GetByName(hostname, name string) (cookie *http.Cookie, err error)

GetByName returns a cookie by it's hostname and name

func (*Jar) GetHTTPJar Uses

func (j *Jar) GetHTTPJar() http.CookieJar

GetHTTPJar returns stdlib http.CookieJar

func (*Jar) Set Uses

func (j *Jar) Set(hostname string, cookies []*http.Cookie) (err error)

Set sets cookies by the hostname

func (*Jar) SetOne Uses

func (j *Jar) SetOne(hostname string, cookie *http.Cookie) (err error)

SetOne sets a cookie by the hostname

Package jar imports 5 packages (graph) and is imported by 2 packages. Updated 2019-08-08. Refresh now. Tools for package owners.