Documentation ¶
Index ¶
- func ReleaseCookieJar(c *CookieJar)
- type CookieJar
- func (cj *CookieJar) FillRequest(r *fasthttp.Request)
- func (cj *CookieJar) FillResponse(r *fasthttp.Response)
- func (cj *CookieJar) Get() *fasthttp.Cookie
- func (cj *CookieJar) Peek(key string) *fasthttp.Cookie
- func (cj *CookieJar) PeekValue(key string) []byte
- func (cj *CookieJar) Put(cookie *fasthttp.Cookie)
- func (cj *CookieJar) ReadRequest(r *fasthttp.Request)
- func (cj *CookieJar) ReadResponse(r *fasthttp.Response)
- func (cj *CookieJar) Release()
- func (cj *CookieJar) ReleaseCookie(key string)
- func (cj *CookieJar) Set(key, value string)
- func (cj *CookieJar) SetBytesK(key []byte, value string)
- func (cj *CookieJar) SetBytesKV(key, value []byte)
- func (cj *CookieJar) SetBytesV(key string, value []byte)
- func (cj *CookieJar) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseCookieJar ¶
func ReleaseCookieJar(c *CookieJar)
ReleaseCookieJar returns CookieJar to the pool
Types ¶
type CookieJar ¶
CookieJar is container of cookies
This object is used to handle multiple cookies
func AcquireCookieJar ¶
func AcquireCookieJar() *CookieJar
AcquireCookieJar returns an empty CookieJar object from pool
func (*CookieJar) FillRequest ¶
FillRequest dumps all cookies stored in cj into Request adding this values to Cookie header.
func (*CookieJar) FillResponse ¶
FillResponse dumps all cookies stored in cj into Response adding this values to Cookie header.
func (*CookieJar) Put ¶
SetCookie sets cookie using its key.
After that you can use Peek or Get function to get cookie value.
func (*CookieJar) ReadRequest ¶
ReadRequest gets all cookies from a Request reading Set-Cookie header.
func (*CookieJar) ReadResponse ¶
ReadResponse gets all Response cookies reading Set-Cookie header.
func (*CookieJar) ReleaseCookie ¶
ReleaseCookie releases a cookie specified by parsed key.
func (*CookieJar) Set ¶
Set sets cookie using key-value
This function can replace an existent cookie
func (*CookieJar) SetBytesK ¶
SetBytesK sets cookie using key=value
This function can replace an existent cookie.
func (*CookieJar) SetBytesKV ¶
SetBytesKV sets cookie using key=value
This function can replace an existent cookie.