mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-12 20:58:52 +00:00
fix(script): match the main request default for the script http timeout
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -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 |
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user