http.Request类型

  1. 源代码[https://golang.org/src/net/http/request.go](https://golang.org/src/net/http/request.go)中定义的```http.Request```结构类型如下:
  2. > ```go
  3. > type Request struct {
  4. > Method string
  5. > URL *url.URL
  6. > Proto string // "HTTP/1.0"
  7. > ProtoMajor int // 1
  8. > ProtoMinor int // 0
  9. > Header Header
  10. > Body io.ReadCloser
  11. > GetBody func() (io.ReadCloser, error)
  12. > ContentLength int64
  13. > TransferEncoding []string
  14. > Close bool
  15. > Host string
  16. > Form url.Values
  17. > PostForm url.Values
  18. > MultipartForm *multipart.Form
  19. > Trailer Header
  20. > RemoteAddr string
  21. > RequestURI string
  22. > TLS *tls.ConnectionState
  23. > Cancel <-chan struct{}
  24. > Response *Response
  25. > ctx context.Context
  26. > }
  27. >