package httputil

import "github.com/coreos/pkg/httputil"

Index

Constants

const (
	JSONContentType = "application/json"
)

Functions

func DeleteCookies

func DeleteCookies(w http.ResponseWriter, cookieNames ...string)

DeleteCookies effectively deletes all named cookies by wiping all data and setting to expire immediately.

func WriteJSONResponse

func WriteJSONResponse(w http.ResponseWriter, code int, resp interface{}) error

Source Files

cookie.go json.go

Version
v0.0.0-20240122114842-bbd7aa9bf6fb (latest)
Published
Jan 22, 2024
Platform
linux/amd64
Imports
3 packages
Last checked
2 weeks ago

Tools for package owners.