mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
optimize http headers
This commit is contained in:
@@ -2,7 +2,6 @@ package requests
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"net/http"
|
||||
|
||||
"github.com/gospider007/gson"
|
||||
@@ -14,10 +13,10 @@ var AcceptLanguage = "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
|
||||
// 请求操作========================================================================= start
|
||||
func DefaultHeaders() http.Header {
|
||||
return http.Header{
|
||||
"Accept-Encoding": []string{"gzip, deflate, br"},
|
||||
"Accept": []string{"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},
|
||||
"Accept-Language": []string{AcceptLanguage},
|
||||
"User-Agent": []string{UserAgent},
|
||||
"Accept": []string{"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},
|
||||
"Accept-Encoding": []string{"gzip, deflate, br"},
|
||||
"Accept-Language": []string{AcceptLanguage},
|
||||
}
|
||||
}
|
||||
func (obj *RequestOption) initHeaders() error {
|
||||
|
||||
Reference in New Issue
Block a user