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.

            Source Files