http.go
func (req *Request) Body() []byte {
	if req.bodyStream != nil {
		bodyBuf := req.bodyBuffer()
		bodyBuf.Reset()
		_, err := copyZeroAlloc(bodyBuf, req.bodyStream)
		req.closeBodyStream()
		if err != nil {
			bodyBuf.SetString(err.Error())
		}
	} else if req.onlyMultipartForm() {
		body, err := marshalMultipartForm(req.multipartForm, req.multipartFormBoundary)
		if err != nil {
			return []byte(err.Error())
		}
		return body
	}
	return req.bodyBytes()
}
func (req *Request) Body() []byte {
	if req.bodyStream != nil {
		bodyBuf := req.bodyBuffer()
		bodyBuf.Reset()
		_, err := copyZeroAlloc(bodyBuf, req.bodyStream)
		req.closeBodyStream()
		if err != nil {
			bodyBuf.SetString(err.Error())
		}
	} else if req.onlyMultipartForm() {
		body, err := marshalMultipartForm(req.multipartForm, req.multipartFormBoundary)
		if err != nil {
			return []byte(err.Error())
		}
		return body
	}
	return req.bodyBytes()
}
func ( req * Request ) Body ( ) [ ] byte { if req . bodyStream != nil { bodyBuf := req . bodyBuffer ( ) bodyBuf . Reset ( ) _ , err := copyZeroAlloc ( bodyBuf , req . bodyStream ) req . closeBodyStream ( ) if err != nil { bodyBuf . SetString ( err . Error ( ) ) } } else if req . onlyMultipartForm ( ) { body , err := marshalMultipartForm ( req . multipartForm , req . multipartFormBoundary ) if err != nil { return [ ] byte ( err . Error ( ) ) } return body } return req . bodyBytes ( ) }
// Body returns request body.
//
// The returned body is valid until the request modification.
Body returns request body . The returned body is valid until the request modification .