XU XUv0.16.0

#net/http/cookiejar

import: #net/http/cookiejar

counts: 2 functions, 3 methods, 2 types, 0 constants, 0 method sets

In-memory cookie Jar. Domain-attribute cookies are ignored (no public suffix list).

struct Jar

XuAPI
pub struct Jar {
    pub names []string
    pub values []string
    pub hosts []string
    pub paths []string
    pub secures []int
}

Purpose

Structure encapsulating names, values, hosts, paths, secures.

Public fields

names []string
field ([]string)
values []string
field ([]string)
hosts []string
field ([]string)
paths []string
field ([]string)
secures []int
field ([]int)

new_jar

XuAPI
pub fn new_jar() Jar

Purpose

Construct jar.

Parameters

No arguments are required.

Returns

Jar — a value of this type

(&Jar) len

XuAPI
pub fn (j &Jar) len() int

Purpose

Operation on &Jar: return the length.

Parameters

j &Jar
The Jar instance used by this call (borrow).

Returns

int — a value of this type

(&Jar) cookies

XuAPI
pub fn (j &Jar) cookies(u &url.URL) []Cookie

Purpose

Execute cookies on &Jar.

Parameters

j &Jar
The Jar instance used by this call (borrow).
u &url.URL
u (read-only borrow; caller keeps the original; type &url.URL)

Returns

[]Cookie — slice result