Documentation ¶
Overview ¶
Package httpcache provides an interface to HTTP request static cache,
Usage example :
func main() { url := "https://api.github.com/repos/astaxie/beego/contributors" body := httpcache.MakeCachedHTTPRequest(url) jsonResp, linkHeader, _ := httpcache.ReadResp(body) fmt.Printf("%s\n%s", jsonResp, linkHeader) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilename ¶
GetFilename gets encoded filename for cache usage
func MakeCachedHTTPRequest ¶
MakeCachedHTTPRequest makes a cacheable request to the external URL If the request was already made once, it will be not done again, but read from the file in temporary folder. Currently is was tested only for GET queries
func MakeHTTPRequest ¶
MakeHTTPRequest makes a non-cacheable request to the external URL
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.