G
YouTube TikTok Games
Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.
vicansoPublic archive

About

HTTP request freshness testing

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

fresh

Build Status

HTTP response freshness testing,it is copied from fresh by golang.

API

Fresh

  • RequestHeader
  • ResponseHeader
req := httptest.NewRequest("GET", "/users/me", nil)
resp := httptest.NewRecorder()
// true
Fresh(req.Header, resp.Header)

Check

  • modifiedSince IfNoneMatch of request header field

  • noneMatch IfNoneMatch of request header field

  • cacheControl Cache-Control of request header field

  • lastModified LastModified of response header field

  • eTag ETag of response header field

Check([]byte("Sat, 01 Jan 2000 00:00:00 GMT"), []byte("\"foo\""), nil, []byte("Sat, 01 Jan 2000 00:00:00 GMT"), []byte("\"foo\""))

About

HTTP request freshness testing

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages