MCPcopy
hub / github.com/iuroc/bilidown / SimpleGET

Method SimpleGET

server/bilibili/client.go:19–35  ·  view source on GitHub ↗

SimpleGET 简单的 GET 请求

(_url string, params map[string]string)

Source from the content-addressed store, hash-verified

17
18// SimpleGET 简单的 GET 请求
19func (client *BiliClient) SimpleGET(_url string, params map[string]string) (*http.Response, error) {
20 values := url.Values{}
21 for k, v := range params {
22 values.Set(k, v)
23 }
24 _client := http.Client{
25 Transport: &http.Transport{
26 Proxy: http.ProxyURL(nil),
27 },
28 }
29 request, err := http.NewRequest("GET", _url+"?"+values.Encode(), nil)
30 if err != nil {
31 return nil, err
32 }
33 request.Header = client.MakeHeader()
34 return _client.Do(request)
35}
36
37// MakeHeader 生成请求头
38func (client *BiliClient) MakeHeader() http.Header {

Callers 11

GetVideoInfoMethod · 0.95
GetSeasonInfoMethod · 0.95
GetPlayInfoMethod · 0.95
GetPopularVideosMethod · 0.95
GetFavlistByPageMethod · 0.95
CheckLoginMethod · 0.95
NewQRInfoMethod · 0.95
getWbiKeyRemoteMethod · 0.95
GetQRStatusMethod · 0.95
DownloadMediaFunction · 0.80

Calls 1

MakeHeaderMethod · 0.95

Tested by

no test coverage detected