cookie

package
v0.0.0-...-41da83f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package cookie is used to get and set HTTP cookies.

Index

Constants

View Source
const AlternativeModuleFlash = "tmp-redirected-from-alternative-module"

AlternativeModuleFlash indicates the alternative module path that a request was redirected from.

Variables

This section is empty.

Functions

func Base64Value

func Base64Value(c *http.Cookie) (string, error)

Base64Value decodes the value of c using the Base64 URL encoding and returns it as a string.

func Extract

func Extract(w http.ResponseWriter, r *http.Request, name string) (_ string, err error)

Extract returns the value of the cookie at name and deletes the cookie.

func Set

func Set(w http.ResponseWriter, name, val, urlPath string)

Set sets a cookie at the urlPath with name and val.

Types

This section is empty.

Jump to

Keyboard shortcuts

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