August 2019
Beginner to intermediate
798 pages
17h 2m
English
The definition of the http.Response structure, which can be found in the https://golang.org/src/net/http/response.go file, is as follows:
type Response struct {
Status string // e.g. "200 OK"
StatusCode int // e.g. 200
Proto string // e.g. "HTTP/1.0"
ProtoMajor int // e.g. 1
ProtoMinor int // e.g. 0
Header Header
Body io.ReadCloser
ContentLength int64
TransferEncoding []string
Close bool
Uncompressed bool
Trailer Header
Request *Request
TLS *tls.ConnectionState
}
The goal of this pretty complex http.Response type is to represent the response of an HTTP request. The source file contains more information about the purpose of each field of the structure, which is the case with most struct types found in the standard Go ...
Read now
Unlock full access