mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-09 03:50:26 +08:00
HTTP DNS请求时增加Content-Type
This commit is contained in:
@@ -164,10 +164,11 @@ func (this *CustomHTTPProvider) post(params maps.Map) (respData []byte, err erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
timestamp := strconv.FormatInt(time.Now().Unix(), 10)
|
var timestamp = strconv.FormatInt(time.Now().Unix(), 10)
|
||||||
req.Header.Set("Timestamp", timestamp)
|
req.Header.Set("Timestamp", timestamp)
|
||||||
req.Header.Set("Token", fmt.Sprintf("%x", sha1.Sum([]byte(this.secret+"@"+timestamp))))
|
req.Header.Set("Token", fmt.Sprintf("%x", sha1.Sum([]byte(this.secret+"@"+timestamp))))
|
||||||
req.Header.Set("User-Agent", teaconst.ProductName+"/"+teaconst.Version)
|
req.Header.Set("User-Agent", teaconst.ProductName+"/"+teaconst.Version)
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
resp, err := customHTTPClient.Do(req)
|
resp, err := customHTTPClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user