cookie

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Provides cookie funtions until https://github.com/golang/go/issues/25194 is resolved.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCookies

func ReadCookies(h http.Header, filter string) []*http.Cookie

ReadCookies parses all "Cookie" values from the header h and returns the successfully parsed Cookies.

if filter isn't empty, only cookies of that name are returned

func ReadSetCookies

func ReadSetCookies(h http.Header) []*http.Cookie

ReadSetCookies parses all "Set-Cookie" values from the header h and returns the successfully parsed Cookies.

func SetCookie

func SetCookie(h http.Header, cookie *http.Cookie) http.Header

SetCookie adds a Set-Cookie header to the provided ResponseWriter's headers. The provided cookie must have a valid Name. Invalid cookies may be silently dropped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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