August 2019
Beginner to intermediate
798 pages
17h 2m
English
The purpose of the http.Request type is to represent an HTTP request as received by a server, or as about to be sent to a server by an HTTP client.
The http.Request structure type as defined in https://golang.org/src/net/http/request.go is as follows:
type Request struct {
Method string
URL *url.URL
Proto string // "HTTP/1.0"
ProtoMajor int // 1
ProtoMinor int // 0
Header Header
Body io.ReadCloser
GetBody func() (io.ReadCloser, error)
ContentLength int64
TransferEncoding []string
Close bool
Host string
Form url.Values
PostForm url.Values
MultipartForm *multipart.Form
Trailer Header
RemoteAddr string
RequestURI string
TLS *tls.ConnectionState
Cancel <-chan struct{}
Response *Response
ctx context.Context
}
Read now
Unlock full access