This commit is contained in:
1-6
2023-07-15 07:15:49 +08:00
parent a15c68055f
commit 20cc7e343c
5 changed files with 139 additions and 29 deletions
+1 -1
View File
@@ -166,6 +166,7 @@ func fetch(vm *goja.Runtime, uuid string, wts ...interface{}) (interface{}, erro
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
} else {
req, err = http.NewRequest(method, url, bytes.NewBuffer(body))
if err != nil {
return nil, err
}
@@ -184,7 +185,6 @@ func fetch(vm *goja.Runtime, uuid string, wts ...interface{}) (interface{}, erro
var rspObj goja.Proxy
var rsp *http.Response
var err error
var client = &http.Client{
Timeout: timeout,
}