-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp.go
More file actions
40 lines (33 loc) · 816 Bytes
/
http.go
File metadata and controls
40 lines (33 loc) · 816 Bytes
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
34
35
36
37
38
39
40
package libtower
import "time"
// HTTP type
type HTTP struct {
URL string
Method string
Timeout Timeout
Status string // e.g. "200 OK"
StatusCode int
Proto string // e.g. "HTTP/1.0"
ProtoMajor int // e.g. 1
ProtoMinor int // e.g. 0
Header map[string][]string
Body []byte
ContentLength int64
TransferEncoding []string
Close bool
Uncompressed bool
Trailer map[string][]string
// TODO: add tls fields
Time
}
// HTTPTrace type
type HTTPTrace struct {
URL string
Method string
DNS time.Duration
TLSHandshake time.Duration
Connect time.Duration
GotFirstResponseByte time.Duration
Total time.Duration
Time
}