Documentation ¶
Overview ¶
Copyright 2022 Hal Canary Use of this program is governed by the file LICENSE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶ added in v0.1.1
Call `client.Do(http.NewRequest())`, but with extra steps. Set `User-Agent` and `Referer` (if set). If Error status code is returned, close body and return `error`.
func GetUrl ¶
func GetUrl(url, ref string, force bool) (io.ReadCloser, error)
Fetch the content of a URL, using a cache if possible and if force is false.
func Post ¶ added in v0.1.1
func Post(client *http.Client, data url.Values, requestUrl, referer, userAgent string) (io.ReadCloser, string, error)
Call `client.Do(http.NewRequest())`, but with extra steps. Make sure `Content-Type` is `application/x-www-form-urlencoded` Set `User-Agent` and `Referer` (if set). If Error status code is returned, close body and return `error`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.