Registry / utility / go-http-utils-fresh

go-http-utils-fresh

JSON →
library0.0.0-20161124030543-7231e26a4b27gogounverified

A Go library for HTTP freshness checks (If-None-Match/If-Modified-Since).

go get github.com/go-http-utils/fresh
INSTALL
IMPORT
SIG · GO-HTTP-UTILS-FRES
G
go-http-utils-fresh
utilitygov0.0.0-20161124030543-7231e26a4b27
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fresh
github.com/go-http-utils/fresh

Checks if a cached response is still fresh.

package main import ( "net/http" "github.com/go-http-utils/fresh" ) func handler(w http.ResponseWriter, r *http.Request) { if fresh.IsFresh(r.Header, w.Header()) { w.WriteHeader(http.StatusNotModified) return } w.Write([]byte("Hello")) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20161124030543-7231e26a4b27latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources