fix(script): match the main request default for the script http timeout

This commit is contained in:
aykhans committed 2026-10-02 01:13:25 +04:00
1 parent a1e4c15285
commit 51e8f2a57f
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -599,7 +599,7 @@ http(url, opts)
| `params` | table/object | - | Query parameters, added to any already in the URL |
| `cookies` | table/object | - | Cookies, sent as a single `Cookie` header |
| `body` | string | `""` | Request body |
| `timeout` | duration string (`"500ms"`) | `30s` | Request timeout (the `timeout` config does not apply), applied to each hop when redirects are followed |
| `timeout` | duration string (`"500ms"`) | `10s` | Request timeout (the `timeout` config does not apply), applied to each hop when redirects are followed |
| `insecure` | boolean | `false` | Skip TLS verification (the `insecure` config does not apply) |
| `maxRedirects` | number | `0` | How many redirects to follow, `0` follows none, maximum 100 |
+2 -2
View File
@@ -14,8 +14,8 @@ import (
"go.aykhans.me/sarin/internal/types"
)
// scriptHTTPDefaultTimeout is the default timeout for script requests, independent of -T.
const scriptHTTPDefaultTimeout = 30 * time.Second
// scriptHTTPDefaultTimeout is the default timeout for script requests.
const scriptHTTPDefaultTimeout = 10 * time.Second
// scriptHTTPClient sends scripts' http.* requests. It is safe for concurrent use.
type scriptHTTPClient struct {