-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathoptions.go
33 lines (29 loc) · 931 Bytes
/
options.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package rawhttp
import (
"time"
"github.com/projectdiscovery/fastdialer/fastdialer"
"github.com/projectdiscovery/rawhttp/client"
)
// Options contains configuration options for rawhttp client
type Options struct {
Timeout time.Duration
FollowRedirects bool
MaxRedirects int
AutomaticHostHeader bool
AutomaticContentLength bool
CustomHeaders client.Headers
ForceReadAllBody bool // ignores content length and reads all body
CustomRawBytes []byte
Proxy string
ProxyDialTimeout time.Duration
SNI string
FastDialer *fastdialer.Dialer
}
// DefaultOptions is the default configuration options for the client
var DefaultOptions = &Options{
Timeout: 30 * time.Second,
FollowRedirects: true,
MaxRedirects: 10,
AutomaticHostHeader: true,
AutomaticContentLength: true,
}