v0.0.0-...-b3daa55 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


type Jar

type Jar struct {
	// contains filtered or unexported fields

Jar contains stdlib http cookie jar

func New

func New() *Jar

New returns new empty cookie jar

func (*Jar) Clear

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

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

func (*Jar) Delete

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

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

func (*Jar) Get

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

Get returns all cookies by hostname

func (*Jar) GetByName

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

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

GetHTTPJar returns stdlib http.CookieJar

func (*Jar) Set

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

Set sets cookies by the hostname

func (*Jar) SetOne

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

SetOne sets a cookie by the hostname

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL