Instance Property

httpBodyStream

The request body as an input stream.

Declaration

var httpBodyStream: InputStream? { get set }

Discussion

The request body of the receiver will be this input stream. The entire contents of the stream will be sent as the body, as in an HTTP POST request. The input stream should be unopened and the receiver will take over as the stream’s delegate.

Setting a body stream clears any data in httpBody. These values are mutually exclusive.

See Also

Accessing Request Components

var httpMethod: String

The HTTP request method.

var url: URL?

The URL being requested.

var httpBody: Data?

The request body.

var mainDocumentURL: URL?

The main document URL.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software