Documentation ¶
Index ¶
- Variables
- func RequestGet(url string, successFunc func(respData []byte), errorFuc func())
- func RequestPost(url string, data []byte, successFunc func(respData []byte), errorFuc func())
- func RequestPostWithBasicAuth(url string, authName string, authPwd string, data []byte, ...)
- type GTToolsHttpRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpRequest *GTToolsHttpRequest Once sync.Once UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" )
Functions ¶
func RequestGet ¶
func RequestPost ¶
RequestPost POST请求
Types ¶
type GTToolsHttpRequest ¶
type GTToolsHttpRequest struct { HttpClient *http.Client CurrentRequest *http.Request CurrentResponse *http.Response CurrentResponseBody []byte CurrentError error // contains filtered or unexported fields }
func (*GTToolsHttpRequest) SetUp ¶
func (httpReq *GTToolsHttpRequest) SetUp()
Click to show internal directories.
Click to hide internal directories.