New (cookiejar/jar.go)

go · src/net/http/cookiejar/jar.go · go · BSD-3-Clause
integration

Implements an RFC 6265-compliant in-memory CookieJar for HTTP clients.

// Source: https://github.com/golang/go | License: BSD-3-Clause | Copyright 2009 The Go Authors
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package cookiejar implements an in-memory [RFC 6265]-compliant [http.CookieJar].
//
// [RFC 6265]: https://www.rfc-editor.org/info/rfc6265
package cookiejar

import (
	"cmp"
	"errors"
	"fmt"
	"net"
	"net/http"
	"net/http/internal/ascii"
	"net/netip"
	"net/url"
	"slices"
	"strings"
	"sync"
	"time"
)

// PublicSuffixList provides the public suffix of a domain. For example:
//   - the public suffix of "example.com" is "com",
//   - the public suffix of "foo1.foo2.foo3.co.uk"

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key