Documentation ¶
Index ¶
- Constants
- Variables
- func AddHook(httpHook GobaseHttpHook)
- func Delete(url string, header http.Header, parameterMap map[string]string) (int, http.Header, any, error)
- func DeleteOfStandard(url string, header http.Header, parameterMap map[string]string) (int, http.Header, any, error)
- func DeleteSimple(url string) (int, http.Header, any, error)
- func DeleteSimpleOfStandard(url string) (int, http.Header, any, error)
- func Do(httpRequest *http.Request) (int, http.Header, any, error)
- func Get(url string, header http.Header, parameterMap map[string]string) (int, http.Header, any, error)
- func GetClient() *http.Client
- func GetOfStandard(url string, header http.Header, parameterMap map[string]string) (int, http.Header, any, error)
- func GetSimple(url string) (int, http.Header, any, error)
- func GetSimpleOfStandard(url string) (int, http.Header, any, error)
- func Head(url string, header http.Header, parameterMap map[string]string) error
- func HeadSimple(url string) error
- func Patch(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PatchOfStandard(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PatchSimple(url string, body any) (int, http.Header, any, error)
- func PatchSimpleOfStandard(url string, body any) (int, http.Header, any, error)
- func Post(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PostForm(url string, header http.Header, parameterMap map[string]any) (int, http.Header, any, error)
- func PostOfStandard(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PostSimple(url string, body any) (int, http.Header, any, error)
- func PostSimpleOfStandard(url string, body any) (int, http.Header, any, error)
- func Put(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PutOfStandard(url string, header http.Header, parameterMap map[string]string, body any) (int, http.Header, any, error)
- func PutSimple(url string, body any) (int, http.Header, any, error)
- func PutSimpleOfStandard(url string, body any) (int, http.Header, any, error)
- func SetHttpClient(httpClientOuter *http.Client)
- func UrlWithParameter(url string, parameterMap map[string]string) string
- type DataResponse
- type GobaseHttpHook
- type NetError
Constants ¶
View Source
const ( MaxIdleConns int = 100 MaxIdleConnsPerHost int = 100 IdleConnTimeout int = 90 ContentTypeJson string = "application/json; charset=utf-8" ContentTypeHtml string = "text/html; charset=utf-8" ContentTypeText string = "text/plain; charset=utf-8" ContentTypeCss string = "text/css; charset=utf-8" ContentTypeJavaScript string = "application/x-javascript; charset=utf-8" ContentTypeJpeg string = "image/jpeg" ContentTypePng string = "image/png" ContentTypeGif string = "image/gif" ContentTypeAll string = "*/*" ContentPostForm string = "application/x-www-form-urlencoded" )
Variables ¶
View Source
var NetHttpHooks []GobaseHttpHook
Functions ¶
func AddHook ¶ added in v1.4.5
func AddHook(httpHook GobaseHttpHook)
func DeleteOfStandard ¶
func DeleteSimpleOfStandard ¶
func GetOfStandard ¶
func HeadSimple ¶
func PatchOfStandard ¶
func PatchSimpleOfStandard ¶
func PostOfStandard ¶
func PostSimpleOfStandard ¶
func PutOfStandard ¶
func PutSimpleOfStandard ¶
func SetHttpClient ¶
Types ¶
type DataResponse ¶
type GobaseHttpHook ¶ added in v1.4.5
Click to show internal directories.
Click to hide internal directories.