Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Property

data

The buffered body, or nil if there is none or nothing has collected it yet.
var data: Data? { get }

Discussion

Bodies are lazy, so this is nil until something asks for the bytes. Use data(max:) to collect the body and always get what is there.